Hi i saw some post about this issue but i don't know it was solved or not... So if i attach a scene node to a joint node (myAnimatedMeshSceneNode->getJointNode("blah")) no matter what i do those attached nodes are always "late" one frame i've tried updating the absolute positions in any possible way but nothing helped...
Can someone help me with this ? or is there a patch ?
Thanks
How to attach nodes to bones ?
Re: How to attach nodes to bones ?
Try to set setJointMode to EJUOR_READ. Looking at the code this might work -but no guarantees.
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
Code snippet repository: https://github.com/mzeilfelder/irr-playground-micha
Free racer made with Irrlicht: http://www.irrgheist.com/hcraftsource.htm
-
- Posts: 28
- Joined: Mon Nov 02, 2009 9:51 am
Re: How to attach nodes to bones ?
Hm... EJUOR_READ didn't helped , however as been mentioned in other threads if i uncomment the updateAbsolutePosition() in the CBoneSceneNode 's OnAnimate() method , then it works fine...
Re: How to attach nodes to bones ?
Yeah, I was also confused why that is commented out. But then noticed that it should be updated in another place when EJUOR_READ is set, so I suppose that might have been the reason. But I'm not familliar enough with the animation system to know what's going on. Do you maybe have a test-case to debug this? I have never used this, so I have no examples or anything for that available.
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
Code snippet repository: https://github.com/mzeilfelder/irr-playground-micha
Free racer made with Irrlicht: http://www.irrgheist.com/hcraftsource.htm
Re: How to attach nodes to bones ?
There is a function called.
updateAbsolutePositionOfAllChildren()
Have you tried it yet.
If that doesn't work just call update positions before the begin scene. I think that would work.
Regards
thanh
updateAbsolutePositionOfAllChildren()
Have you tried it yet.
If that doesn't work just call update positions before the begin scene. I think that would work.
Regards
thanh
Re: How to attach nodes to bones ?
@thanhle: That's what I also thought at first. But I think the problem is that animation happens inside rendering - so the children nodes have to be updated after the animation but before rendering. Which is not yet possible. So that's what I thought the EJUOR_READ is about, it seemed to do that from a quick look at the code. But I guess I'm missing something in what's happening, that's why I need an example to see the bug in action.
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
Code snippet repository: https://github.com/mzeilfelder/irr-playground-micha
Free racer made with Irrlicht: http://www.irrgheist.com/hcraftsource.htm
-
- Posts: 28
- Joined: Mon Nov 02, 2009 9:51 am
Re: How to attach nodes to bones ?
Hi i tried updateAbsolutePositionOfAllChildren() , unfortunately that didn't worked either. Well i tried updating the absoulute positions in all possible ways in all posible points of my app it just didn't woked. One approach would be is to update them before device->run() but thats impossible , From the other hand i'm not sure writing a separate update code for some nodes is a good idea , that breaks the good old scene graph rule. It just should work by setting it's parent anywhere anytime in the game regardless what type the ISceneNode is. (Bone ligtht mesh or custom)
CureAlien : i'm busy today but i will create a demo maybe tonight or tomorrow
Regards
CureAlien : i'm busy today but i will create a demo maybe tonight or tomorrow
Regards
Re: How to attach nodes to bones ?
Take your time, it'll be a while until I get to it as well.johann_gambolputty wrote:CureAlien : i'm busy today but i will create a demo maybe tonight or tomorrow
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
Code snippet repository: https://github.com/mzeilfelder/irr-playground-micha
Free racer made with Irrlicht: http://www.irrgheist.com/hcraftsource.htm