Here some pictures of my problem :


And my code :
Code: Select all
selectedSceneNode =
collMan->getSceneNodeAndCollisionPointFromRay(
verticalLine,
intersection,
HitTriangle,
IDFlag_IsPickable, // This ensures that only nodes that we have set up to be pickable are considered
0); // Check the entire scene (this is actually the implicit default)
if(selectedSceneNode != 0)
{
if(HitTriangle != lastHitTriangle)
{
lastHitTriangle = HitTriangle;
core::vector3df normal = HitTriangle.getNormal();
So how can I rotate my mesh with the normal ?