
this post is huge so I split it in to chapters and even added an image
background
The game is like a classic side scrolling shooter but with the camera behind the player's ship ('star fox' rip off). I'm using subclasses of scene nodes. example class hiarachy goes like this-
ISceneNode -> CGameSceneNode -> CPlayerShipSceneNode
I'm doing movement in CGameSceneNode::OnPostRender like so:
PlayerShip.setPosition(PlayerShip.getPosition + velocity * timepassed);
My camera is a child node of a GameSceneNode which follows my PlayerShip. Inside CamHolder::OnPostRender I make the camera look at its target (around 0,0,Z), and set the position of CamHolder (definatly lazy, probably bad, don't think it's the problem)
My player ship gamenode has children, here's the relevant ones:
Code: Select all
ShipNode (gamenode)
-ShipMesh (animatedmeshscenenode)
-ShipsBoosters (customscenenode)
-BoosterLight (lightscenenode) *problem here*

the problem:
when the frame rate slows down (i force it), as you can see...

the light moves forwards in to the ship. (pls ignore the particles, I messed the timing up)
Because of the style of the game I can botch it by making the light a child of the gamenode instead of the animated mesh node.
the question part
is this a bug? (lights two or more nodes deep go out of sync perhaps?)
have i got it all wrong?
anyone else struggled with this and have tips/suggestions?
bonus!
all helpful posters get a cookie!
if this thread leads me to enlightenment I'll write a custom scene node timing tutorial for the wiki
