[Bleeding] How to get Body object from Actor ?

FriedChicken

22-06-2008 07:03:31

In callback function, the type of passed in argument is Actor.
I want its corresponding Body object, because I need to modify its rendering attributes. But I didn't find a way.

gugus

22-06-2008 08:22:30

Body* body = static_cast<Body*>(actor);
:wink:
Of course,you need to be sure that's its a body and not an Actor.

betajaen

22-06-2008 10:17:13

And that is done by:

actor->getType() == NxOgreClass_Body