Yue Posted January 14, 2022 Posted January 14, 2022 When I press the R key, the joint searches for the position and rotation of the cylinders. From my point of view the joint should fall to the ground without any problem, but I have a strange behavior, and the joint moves to the right of the stage until it falls off the platform. Script.player = nil --entity "Player" Script.mThorax = nil --entity "mThorax" Script.thorax = nil --entity "Thorax" function Script:Start() self.mThorax:SetParent(self.player,true) self.player:SetColor(1,0,0) self.entity:SetMass(10) self.thorax:SetMass(10) self.pin = self.entity:GetPosition(true) self.joint = Joint:Hinge(self.pin.x,self.pin.y,self.pin.z,1,0,0, self.thorax, self.entity) self.joint:EnableLimits() self.joint:SetLimits(0,90) end function Script:UpdateWorld() self.GetRot = self.player:GetRotation(true) self.GetRot2= self.mThorax:GetRotation(true) self.GetPos = self.player:GetPosition(true) self.GetPos2= self.mThorax:GetPosition(true) if Window:GetCurrent():KeyDown(Key.G) then self.player:Turn(0,1,0,false) end if Window:GetCurrent():KeyHit(Key.R) then self.entity:SetRotation(self.GetRot,true) self.entity:SetPosition(self.GetPos,true) self.thorax:SetPosition(self.GetPos2,true) self.thorax:SetRotation(self.GetRot2,true) self.player:SetParent(self.entity,true) self.mThorax:SetParent(self.thorax,true) end end Quote Murphy's Law: We don't fix bugs, we document them as features. – Murphy Games
Josh Posted January 15, 2022 Posted January 15, 2022 Can you upload a project I can run? 1 Quote My job is to make tools you love, with the features you want, and performance you can't live without.
Yue Posted January 15, 2022 Author Posted January 15, 2022 I discovered something, at the moment of moving the rigid bodies of the joint, the target cylinders have the collision prop, that's why the effect, however if I put the collision of those cylinders in Collision.None ( Simulating Ragdoll ). This does not happen anymore. Quote Murphy's Law: We don't fix bugs, we document them as features. – Murphy Games
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.