Scene Graph & 3rd person handler

Hi all,

I just ran the TestSceneGraph demo again ( i love that demo! ) and I realised something.



Replacing one of the boxes lower down the graph with a camera node, should in principal, give you a ThirdPersonHandler…



If the person is at local translation (0, 0, 0) and teh cameraNode is attached to the same parent as the player, but it has an offset…say a local translation of (0, 0, -10). If you were to “rotate” their parent, the camera should spin around the player. Similarly, moving the parent node, should affect the translation of both the camera and the player…



Let me show you what i mean:







Is there something wrong with this idea? Because it doesn’t work… :?



DP

ok, thanks anyways. I’l stick with using the ThirdPersonHandler instead…

Well, I don’t know how to answer this other than you set it up wrong. The rotation depends on the offset of the child in relation to the parent. So, if you have it set up like the TestSceneGraph, things rotate relative to a point halfway between your camera node and the player node.

Sorry yes.



Instead of rotating around the player, the player ends up rotating around the camera.



I can post the code if you want?



DP

Because it doesn't work....


You have to qualify this.