getAnimationState with NxOgre?

M@rT1n

08-03-2006 02:43:35

Hi anybody!

I was thinking, if NxOgre create a SceneNode an attach and entity to it, how can i get the entity pointer? for example:

If i have a mesh named player.mesh, it contains every animation about the player and it must have physiscs. So, who can i do to get the entity pointer of the mesh to use the member getAnimationState()?

Thanks

betajaen

08-03-2006 09:37:25

Hi anybody!

I was thinking, if NxOgre create a SceneNode an attach and entity to it, how can i get the entity pointer? for example:

If i have a mesh named player.mesh, it contains every animation about the player and it must have physiscs. So, who can i do to get the entity pointer of the mesh to use the member getAnimationState()?



If you added the Entity via the mesh attribute in createBody(..) it is at mNode->mEntity

If you added the Entity afterwards It should be "mBody->mNode->getAttachedObject(x)". I haven't got a PC to try it out on but it's in mNode somewhere!