i want to have a certain weapon to leave a permanent trace on the walls it hits,
like for example bulletholes.
what i think is the way to do it, is to find the intersectionpoint and place an object on the
wall at that point. now this is all easy, the only thing is that the object then needs to be rotated
to be at the same angle as the wall behind it. I have tried using getNormal to get the angle from
a triangle on the wall, to rotate the new object, but it doesn't work.
Does anyone know how to do this?
or am i maybe aproaching the problem the wrong way? is there another way to achieve what
i want?
objects on walls
Are you attaching the decal to the wall as a child, or is it at the same level in the tree?
If you attach it as a child, I'd guess that it'd get the same transformation as the parent, so you likely just need to offset one of the 3 positions in it's relativePos. May work, as long as you don't end up with Z-fighting at some point.
If you attach it as a child, I'd guess that it'd get the same transformation as the parent, so you likely just need to offset one of the 3 positions in it's relativePos. May work, as long as you don't end up with Z-fighting at some point.
Any updates on this? I'm trying to do it for my game too but I can't figure out the bit of maths needed to turn the normal vector into a rotation vector fro my scenenode
.: http://www.mercior.com :.
I don't have any irrlicht specific info, since i haven't begun my bullet hole demo yet, but you might find what you need at http://www.flipcode.com/tutorials/tut_decals.shtml