Jump to content

Joint:SetLimits() is not working for Joint:Ball()


Recommended Posts

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.

Link to comment
Share on other sites

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...