tipforeveryone Posted March 12, 2017 Share Posted March 12, 2017 Below code was attached to a Pivot function Script:Start() self.box1 = Model:Box(0.2,0.2,0.2) self.box1:SetPosition(self.entity:GetPosition()) self.box2 = Model:Box(0.2,0.2,0.2) self.box2:SetPosition(self.entity:GetPosition() + Vec3(0.5,0,0)) end function Script:UpdateWorld() if window:KeyHit(Key.F2) then local pos = self.box1:GetPosition() local joint = Joint:Ball(pos.x,pos.y,pos.z,self.box2,self.box1) joint:SetLimits(10,10) joint:EnableLimits() self.box2:SetMass(1) self.box2:AddForce(100,100,100) end end It works for Joint:Hinge(), I can not set minimum cone angle and twist angle for Joint:Ball anymore. Quote Link to comment Share on other sites More sharing options...
tipforeveryone Posted March 17, 2017 Author Share Posted March 17, 2017 what is wrong? Any idea ? Quote Link to comment Share on other sites More sharing options...
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.