Raycast or collision

markhula
Posts: 34
Joined: Thu Jun 17, 2010 10:11 am

Raycast or collision

Post by markhula »

Hi all,

I am struggling to find a method using either technique.
If (in 2d to keep it simple) a cube collides with (again for simplicity) a rigidbody angled at 45 degress how do I get that angle from the collision i.e. the collider finds the angle (in 1 axis) it has collided with.
I'm not sure which method I should be using, also I am confused by the results anyway.
With raycasting m_hitPointWorld.getY() I assumed would return the y coordinate in world space of my collision but the results do not seem correct.

I appreciate my understanding of Bullet might be an issue! :roll:

Any help appreciated

Thanks