• Make PhysObj:AddAngleVelocity() work correctly
    2 replies, posted
I'm trying something new for myself: coding NPC with ragdoll parts, but i have one big problem: AddAngleVelocity work incorrectly or something like that. I can use Vector(0,Angle,0) and all work fine, but ragdoll must be rotated 0 in pitch and roll and specific angle in yaw. When i try to use pitch and roll all go to hell. What can be wrong here: [CODE]if(IsValid(self.MyDoll)) then self.MyDoll:GetPhysicsObjectNum(0):ApplyForceCenter((self:GetPos()-self.MyDoll:GetPhysicsObjectNum(0):GetPos())*3000) local TEMP_ANG = (self:GetAngles()-self.MyDoll:GetPhysicsObjectNum(0):GetAngles()) TEMP_ANG:RotateAroundAxis(TEMP_ANG:Right(),90) TEMP_ANG:Normalize() TEMP_ANG = (Vector(TEMP_ANG.pitch,TEMP_ANG.yaw,TEMP_ANG.roll):GetNormalized()*300) self.MyDoll:GetPhysicsObjectNum(0):AddAngleVelocity(-self.MyDoll:GetPhysicsObjectNum(0):GetAngleVelocity()+(TEMP_ANG)) end[/CODE] [URL="https://www.dropbox.com/s/kmudrhydn5wwpwd/2017-10-07_22-32-09.mp4?dl=0"]Here is a video.[/URL]
We can't see your video
Video on dropbox sorry (uploaded through ShareX).
Sorry, you need to Log In to post a reply to this thread.