bullet impact on wall

You are an experienced programmer and have a problem with the engine, shaders, or advanced effects? Here you'll get answers.
No questions about C++ programming or topics which are answered in the tutorials!
Post Reply
gromito
Posts: 15
Joined: Tue Feb 08, 2005 3:59 pm
Location: Clermont ferrand, FRANCE

bullet impact on wall

Post by gromito »

I have make a little fps and i want to have bullet impact on the wall when i shoot?

someone can explain me how to do this?

thanks
bal
Posts: 829
Joined: Fri Jun 18, 2004 5:19 pm
Location: Geluwe, Belgium

Post by bal »

Do it like in the techdemo?
General Tools List
General FAQ
System: AMD Barton 2600+, 512MB, 9600XT 256MB, WinXP + FC3
djceejay
Posts: 41
Joined: Fri Feb 25, 2005 11:42 am

Post by djceejay »

Have a look at the collision tutorial - No.7. It casts a ray onto the level and sets a billboard to the impact position. Then you would have to add a decal at that position and rotate it to the slope of the wall/whatever.
You could write a scene node that displays a quad and its constructor takes the triangle (the wall hit) as a parameter. Then add this to the scene graph. In it's update function you could have a counter, when it gets to 0 it deletes itself to free up resources.
djceejay
Studying :: BSc Computer Games Technology :: UK
djceejay
Posts: 41
Joined: Fri Feb 25, 2005 11:42 am

Post by djceejay »

bal - in the techdemo it only creates a particle system at the point of impact. I think gromito wanted to add a decal, like a bullet hole, on the surface.
djceejay
Studying :: BSc Computer Games Technology :: UK
gromito
Posts: 15
Joined: Tue Feb 08, 2005 3:59 pm
Location: Clermont ferrand, FRANCE

Post by gromito »

yes djceejay i want to make bullet hole. i go to the collision tutorial to understand how to make it.

thanks to you and excuse me for my english.
bal
Posts: 829
Joined: Fri Jun 18, 2004 5:19 pm
Location: Geluwe, Belgium

Post by bal »

Aha, then you should look at a feature that is implemented in IrrlichtNX++. Copy it over to your Irrlicht 0.7/0.8 installation or check how it is done or try using NX++. What I'm talking about is a CDecalSceneNode class which does exactly what you want, creating bullet holes (texture) on the place where your collision ray hits the mesh.
General Tools List
General FAQ
System: AMD Barton 2600+, 512MB, 9600XT 256MB, WinXP + FC3
Post Reply