Offset problem

A place to discuss everything related to Newton Dynamics.

Moderators: Sascha Willems, walaber

Offset problem

Postby hach-que » Wed Jan 07, 2009 2:35 am

For some reason, whenever my object that binds Irrlicht and Newton Physics together is created at any position other than 0,0,0, the Irrlicht object seems to be offset by the original position offset. The Irrlicht object's position is updated in the SetTransform callback, and the only explaination I can think of is if the matrix passed to that callback (and the NewtonBodyGetMatrix function), is not relative to 0,0,0, but is instead relative to the newton body's starting position.

I searched the documentation, and couldn't find an answer. Can anyone confirm this?
User avatar
hach-que
 
Posts: 27
Joined: Fri Jun 13, 2008 2:11 am

Re: Offset problem

Postby Julio Jerez » Wed Jan 07, 2009 2:46 am

you need to set the collison offset, to match the origin of the Irrlich mesh.
Julio Jerez
Moderator
Moderator
 
Posts: 12249
Joined: Sun Sep 14, 2003 2:18 pm
Location: Los Angeles

Re: Offset problem

Postby hach-que » Wed Jan 07, 2009 3:08 am

UPDATE: I've fixed the problem, but now the game seems to run really really slow for the first few seconds and then it speeds up again...

UPDATE 2: Solved my slowness problem. My development IDE logs all the console output from the engine, so cout was really slow because it was being redirected.
User avatar
hach-que
 
Posts: 27
Joined: Fri Jun 13, 2008 2:11 am


Return to General Discussion

Who is online

Users browsing this forum: No registered users and 17 guests