Jump to content

Speed up Hinge Joint reaction?


Haydenmango
 Share

Recommended Posts

Is there any way to increase how fast the child of a hinge joint reacts?

 

I am trying to add physics based dangling accessories to an animated character for fun and it is working but the hinge joint reacts too slowly to the movements which makes it look weird.

 

Just for extra info I'm not currently in the beta.

Link to comment
Share on other sites

I mean the tightness of a free spinning joint.

 

For example: Parent and child of hinge joint are both children of a jumping character. The child of the hinge joint is way too slow to follow the character while they are jumping or even walking slowly.

 

So if I used a weapon or even hair as the child it would appear to be floating behind the player as it catches up.

 

Is there any sort of constraint or tightness value I can tweak to make the child react quicker?

 

edit: Come to think of it I had the same issue in my Castle Defender demo game I made. The enemies were made of csg boxes connected by hinge joints so when you picked them up they could ragdoll. The issue appeared when the enemies were moved quickly or thrown as the connected body parts of the enemies would fly in every direction instead of holding together (it was pretty funny in that game though so I never thought to look into it).

Link to comment
Share on other sites

In my edit I describe how this occurs with just csg boxes and hinge joints as well. You can play the Castle Defender game on the workshop to see it happening for yourself.

 

Is there no way to add more constraint/tightness to hinge joints?

  • Upvote 1
Link to comment
Share on other sites

This example shows the issue Haydenmango is describing where the child is slow to follow the parent's movement:

window = Window:Create()
context = Context:Create(window)
world = World:Create()
camera = Camera:Create()
camera:Move(0,0,-4)
light = DirectionalLight:Create()
light:SetRotation(35,35,0)

parent = Model:Box()
parent:SetColor(0.0,0.0,1.0)

child = Model:Box()
child:SetColor(1.0,0.0,0.0)
child:SetMass(1)
child:SetPosition(2,0,0)

joint = Joint:Hinge(0,0,0, 0,0,1, child, parent)

while true do
    if window:Closed() or window:KeyDown(Key.Escape) then return false end

	p = window:GetMousePosition()
	p.z = 4
	p = camera:UnProject(p)
	parent:SetPosition(p)

	Time:Update()
	world:Update()
	world:Render()
	context:Sync()
end

 

  • Upvote 1

Win7 64bit / Intel i7-2600 CPU @ 3.9 GHz / 16 GB DDR3 / NVIDIA GeForce GTX 590

LE / 3DWS / BMX / Hexagon

macklebee's channel

Link to comment
Share on other sites

So based on the lack of direct responses to my question "Is there no way to add more constraint/tightness to hinge joints?" I will assume the answer is that there is currently no way to do this.

 

If there is a way to do this someone please tell me, I really really really want to get this to work properly. I've had so many ideas for using joint physics lately but 90% of these ideas (pretty much any idea involving moving joints) won't work accurately without the ability to constrain/tighten the joints.

 

If there really is no way to do this currently could this topic be moved to the suggestion box please?

Link to comment
Share on other sites

  • 2 weeks later...

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...