Adding two joints to one body

A place to discuss everything related to Newton Dynamics.

Moderators: Sascha Willems, walaber

Adding two joints to one body

Postby Lax » Sat Jun 26, 2021 5:13 am

Hi folks,

is it somehow possible to add two times the dCustomSlider slider to one body?
I want to move a spaceship on x, z-axis with limits. So I need two dCustomSlider slider, one for x-pin and another one for z-pin. But as soon, as I add them two times to the same body, my application will hang forever without a error message, but I see a warning in a thread:

warning!! bilateral joint duplication between bodied: 8 and 1
warning!! bilateral joint duplication between bodied: 8 and 1

Best Regards
Lax
Lax
 
Posts: 196
Joined: Sat Jan 08, 2011 8:24 am

Re: Adding two joints to one body

Postby Julio Jerez » Sat Jun 26, 2021 7:25 am

Yes that's not allowed.

If you need to move a body in the x, z direction, that the y plane. You can use a plane 2d joint.
Julio Jerez
Moderator
Moderator
 
Posts: 12478
Joined: Sun Sep 14, 2003 2:18 pm
Location: Los Angeles

Re: Adding two joints to one body

Postby Lax » Sat Jun 26, 2021 5:35 pm

ok, but the plane2D has not limits. I need to limit the movement.
Lax
 
Posts: 196
Joined: Sat Jan 08, 2011 8:24 am

Re: Adding two joints to one body

Postby Julio Jerez » Sun Jun 27, 2021 6:22 am

If it had limits, would it be what you need?

It is very eassy to subclass it and add limits to it.
Julio Jerez
Moderator
Moderator
 
Posts: 12478
Joined: Sun Sep 14, 2003 2:18 pm
Location: Los Angeles

Re: Adding two joints to one body

Postby Lax » Sun Jun 27, 2021 6:54 am

Yes, Plane with limits would be great! Of course depending what the normal of the plane is. Like slider joints, e.g. minHorizontalLimit, maxHorizontalLimit, minVerticalLimit, maxVerticalLimit.

Best Regards
Lax
Lax
 
Posts: 196
Joined: Sat Jan 08, 2011 8:24 am

Re: Adding two joints to one body

Postby Julio Jerez » Mon Jun 28, 2021 11:38 am

Ok I will make one with limits and post here later.

You can take it and paste it in you code the made changes to it if you want.

I assume the body does not rotate since you were trying to do it with sliders.
Julio Jerez
Moderator
Moderator
 
Posts: 12478
Joined: Sun Sep 14, 2003 2:18 pm
Location: Los Angeles

Re: Adding two joints to one body

Postby Lax » Thu Jul 01, 2021 11:50 am

Hi Julio,

ok thanks! And your assumption is correct.

Best Regards
Lax
Lax
 
Posts: 196
Joined: Sat Jan 08, 2011 8:24 am


Return to General Discussion

Who is online

Users browsing this forum: No registered users and 1 guest