If I perform a rayTestClosest in Bullet I’ll get back an hitPos that seems in global coordinate, so how can get a local pos (or generally a local TransFormState) wrt the hit node?
Thanks for help
If I perform a rayTestClosest in Bullet I’ll get back an hitPos that seems in global coordinate, so how can get a local pos (or generally a local TransFormState) wrt the hit node?
Thanks for help
You could use the NodePath.getRelativePoint function.
Yes, but I don’t know how to get the NodePath from a BulletClosestHitRayResult.getNode() which is a PandaNode.
You can get a NodePath just by wrapping it around the node:
np = NodePath(pandaNode)
David
I resolved.
Thanks to all.