Rotating to a triangles normals

If you are a new Irrlicht Engine user, and have a newbie-question, this is the forum for you. You may also post general programming questions here.
Post Reply
ry
Posts: 8
Joined: Mon Dec 12, 2005 4:15 am
Contact:

Rotating to a triangles normals

Post by ry »

Hello all,
I am trying to make a bullet hole that is on the wall which has been shot. I have got it all working upto the point of where the rotation of the hole is on weird angles. I shoot one wall straight infront of me and its nicely on the wall then I shoot a wall on an angle or the roof and it isnt doing as it should.

Here is the line of code that goes with the bullet hole

Code: Select all

bul_hole->setRotation(tri.getNormal().normalize());
Where tri is the selected triangle from the line collision. I've tried it without the .normalize() but it still doesn't solve the problem.

Thanks for any help that is given,

Ry
kickBack
Posts: 13
Joined: Sat Jan 14, 2006 2:20 pm

Post by kickBack »

Mayb you should look at the irrlicht techdemo..
There is shoting with addind p emmitter after cooll into the needed dir..
Post Reply