How to get HPR of a CollisionEntry?


I am try to get the co-ordinates and HPR of a CollisionEntry.

I know how to get its position with getSurfacePoint however I have no luck in getting the HPR.

Here is an example of codes.

for i in range(self.cHandler.getNumEntries()):
      entry = self.cHandler.getEntry(i)

      if intoNode == "Plane":
            if fromNode == "White":
                   list = self.getModelDimensions(self.ball)
                   newZ = colEntry.getSurfacePoint(render).getZ()
                   self.ballRoot.setZ(newZ+list[2]/2.0 + 0.025)

Help require ASAP.

Thank you. =)

The surface point itself has no HPR…
Only the nodePath you collided into has HPR.
But I guess you want to know the HPR of that point to get a correct reflection vector.
For example if your player bumped into a surface you want him to be reflected from that surface in the right direction.
The direction of the surface of the surfacePoint is stored in its normal vector.
So you might want to get the normal vector from that collision entry.