strange thing happened at the 1st second

Virion

13-08-2007 16:29:54

i put my mesh at 0,500,0.
i set both gravity and floor to true.
when i start my app, the first second my model is at 0,0,0 (i know it because my camera is looking at 0,0,0).
then the second second it starts falling from 0,500,0.
any idea why my model will appear at 0,0,0 at the first second?

danharibo

13-08-2007 16:32:42

Because Ogre begins rendering before the cube is moved.

betajaen

13-08-2007 16:45:50

..also by default any new Scenenodes in bodies are automatically put at 0,0,0 by Ogre. When the time comes around for NxOgre to kick in it moves it to the right spot.

I'll put some code in to set the pose of the node in the body constructor, before the next frame is rendered.

Virion

13-08-2007 16:53:07

Because Ogre begins rendering before the cube is moved.
initialise ogre
initialise nxogre
add resource location
create window
create scene manager
create nxogre scene
set gravity
add cube shape
add light
add camera
add viewport
start rendering
destroy all

i'm sure that i already put the rendering at the back.

betajaen

13-08-2007 16:57:38

Theoretically you should notice it in the first frame, during a full second is something for a bigger problem.

Also, if your using NxOgre in it's default setup which I suspect you are; NxOgre and PhysX will only start simulating when you start rendering. Which is probably the reason why your seeing it for the first second.

Virion

13-08-2007 17:06:18

Theoretically you should notice it in the first frame, during a full second is something for a bigger problem.

Also, if your using NxOgre in it's default setup which I suspect you are; NxOgre and PhysX will only start simulating when you start rendering. Which is probably the reason why your seeing it for the first second.

I think it's not one full second. Probably the first frame then. Is this something to do with the core?

betajaen

13-08-2007 17:08:47

I just told you why, two posts up.