Axis Display in Irrlicht

You are an experienced programmer and have a problem with the engine, shaders, or advanced effects? Here you'll get answers.
No questions about C++ programming or topics which are answered in the tutorials!
Thulsa Doom
Posts: 63
Joined: Thu Aug 05, 2004 9:40 am
Location: Germany

Post by Thulsa Doom »

The problem seems to me as setting up a trihedron in space with a relative but constant position to the camera (joint between two nodes)? Only a translation is allowed for the trihedron no rotation, as the axis always coincide with those of the global coordinate system? In my opinion Billboards won't do it, if there not axis alligned.
Try to place you're camera somewhere looking at the origin. Create a custom sceneNode for the trihedron which renders only three single lines representing the axis of the trihedron along the global axis using draw3DLine(). As you like use three axis alligned Billboards with uses the customNode as parent instead.
Create a superNode inherited from ICameraSceneNode holding camera and trihedron. Changing the position of the superNode will direcly affect the camera position (there both are equal). Changing setTarget of the superNode (lookAt position) will affect the position of the trihedron and the lookAt position of the child camera as well.
Post Reply