Collision Bullet Holes?

Is there a way to make bullet holes based on a collision sensor, not a ray sensor?

Well, there is no “getHitPosition” function for the collision sensor.

Of course, for a quickie solution, if you used actual objects for bullets (instead of the rayhit check method) you could set it so that when bullet hits wall (or object of your choosing), you have the bullet add the “bullet hole” and then you have the bullet itself end.

Now, that’s all rude and crude, but in theory it should work fine for adding holes to static objects, without any fancy coding.

Although, I suggest you type “bullet holes” in the forum search function. There have been a number of methods that others scripted already which work much better (given that you know enough python to properly implement them).

Oh dear, python, grrr :slight_smile: It’s so annoying that you always need it…Well often…
Tell me; What happens if you shoot a corner?

then the bullet hole sticks out…

the best way would be decals but i dont think the ge can do that… i dunno like stuff that goes whatever shape it hits like if you hit a ball it would wrap around

Heh, just learn it.

Tell me; What happens if you shoot a corner?
Hmm, good question.

I’m not really sure that you can hit the exact “corner”. The “exact corner” is just a virtual point in the gamespace afaik, the raysensor only hits faces.

So in other words you could never hit the corner, because the corner is just a byproduct of intersecting faces.

You would always hit a face, but as scaboots already said, if you hit it close to the corner it would stick out.

As for the decals, I think the BGE may be able to do it, but it would require a second texture channel and a copy of the bullet hole texture for each individual object.

Bugger… Maybe that comes with Ogre?

Social: Are you like “V” or something? I mean you answer questions in a way that only few have done… quite funny actually…
You can hit the corner! XD

[quote=James XVI;]Social: Are you like “V” or something? I mean you answer questions in a way that only few have done… quite funny actualy…
You can hit the corner! XD[/quote]

Like “V”? Umm…is that a good thing?

Yes that is a good thing, “V” is a hero…and a very sophisticated and clever man…

Yeah, I searched for any tuts, but only found them for the ray sensor. Oh well, thanks anyways.

Sorry we couldn’t help you out more than that :frowning:
But In case you figure something out please PM me :slight_smile:

Check out the 2.25 game demo files

its the game with the little blue and orange aliens in it.
a python script was used in it to place decals, dunno the details of how it worked but i tried it recently and it still works in current blender versions. the game itself doesn’t fully work though, all enemies are dead.

check out HardMashed

Oi! Thanks alot mate!