[Help changing position of a body]

A place to discuss everything related to Newton Dynamics.

Moderators: Sascha Willems, walaber

[Help changing position of a body]

Postby flavioanunciacao » Thu Jan 15, 2009 12:43 pm

Hi guys!

I´m making a Lift Truck simulator using the Newton Physics Engine. At a given momento I have to change the position of the Lift Truck. I´m using "Newton command: Pause" and changing the "Newton Body" main's position (Lift Truck chassis), also changing all the positions of the bodies linked to the Lift Truck.

I also have to control the Lift Truck elevator's height. The elevator is linked to the lift truck by a "Newton Slider" wich I use to control the max and minimum height using "envelops". The max possible height value is 2 and the minimum is 0. To set the value of this medium height I´m using "set value" with a value of 1, but when physics is restarted it seems like the value is taken to 0 first and only after that reaches 1, throwing the bodies, that were positioned before, between 0 and 1 of the Y vector.

How do I make physic stop reseting the value when it´s restarted, keeping the values setted before?

Thanks for the help!
Posts: 1
Joined: Thu Jan 15, 2009 12:38 pm

Re: [Help changing position of a body]

Postby JernejL » Thu Jan 15, 2009 2:42 pm

You seem to be doing something wrong, it sounds as if you are ressetting the matrixes of visual bodies, but not newton's body matrices?
Help improving the Newton Game Dynamics WIKI
User avatar
Posts: 1531
Joined: Mon Dec 06, 2004 2:00 pm
Location: Slovenia

Return to General Discussion

Who is online

Users browsing this forum: No registered users and 4 guests