Animated view position

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!
Post Reply
tatvasoft5122
Posts: 2
Joined: Fri Feb 10, 2023 5:42 am

Animated view position

Post by tatvasoft5122 »

Hello all,

How can we get the position of animated view?
CuteAlien
Admin
Posts: 9643
Joined: Mon Mar 06, 2006 2:25 pm
Location: Tübingen, Germany
Contact:

Re: Animated view position

Post by CuteAlien »

Please explain a bit what exactly you try to do. I'm not sure what you are talking about. You get the camera position with the getPosition call of the camera, but I suspect that's not what you mean.
IRC: #irrlicht on irc.libera.chat
Code snippet repository: https://github.com/mzeilfelder/irr-playground-micha
Free racer made with Irrlicht: http://www.irrgheist.com/hcraftsource.htm
tatvasoft5122
Posts: 2
Joined: Fri Feb 10, 2023 5:42 am

Re: Animated view position

Post by tatvasoft5122 »

I have full body view in animation, but I need to screen capture some part from the animation at particular point. For example I need the screen shot for hand at some point. Therefore I am trying to get the position of view.
CuteAlien
Admin
Posts: 9643
Joined: Mon Mar 06, 2006 2:25 pm
Location: Tübingen, Germany
Contact:

Re: Animated view position

Post by CuteAlien »

If it's a bone animation you can use IAnimatedMeshSceneNode:: getJointNode to access specific parts. You will get a IBoneSceneNode* which is derived from ISceneNode so it has a getPosition() function. You probably have to set IAnimatedMeshSceneNode::setJoingMode to (irr::scene::EJUOR_READ) first to get those nodes created. Note that this is not a cost-free operation - as it means those nodes will be updated each frame. So you may want to set it back to EJUOR_NONE when you are done.
IRC: #irrlicht on irc.libera.chat
Code snippet repository: https://github.com/mzeilfelder/irr-playground-micha
Free racer made with Irrlicht: http://www.irrgheist.com/hcraftsource.htm
Post Reply