MAKIN An FPS TROUBLE

im makin an FPS game with blender 2.25. my problem is: how can i make high velocity gun shots that react perfectly to any surface collision ending themselves?im trying to do that, but when the physic area of the shot is too small, or when the velocity is too high, the shot passes throught the surface…i dont wanna make a game where u can shoot enemies standing behind a wall…HELP PLZ :-? :-?

What kind of movement are you using for the shots? Avoid DLoc as this will allow an object to pass through walls at high velocities, especially on slower systems.

To end a bullet on collision. Setup a Collision Sensor with a blank property box (any object), which is linked to an End Object Actuator.

i’ve already done it (any collinsio>and>endobject), here comes the problem.
by the way i’m not using the dynamics of the shots to meke em move, but becouse i’ve noticed collision is quite more good; im using the addobject motion to make shots move. in fact if i make the shot move just from the parent force(with no physics bounds) its easier for it to avoid the face collision, instead with a dynamic area the shot is more sensible to collision. but noy at high velocities.
so if i wanna make a rocket luncher, no problem, but a hitscan weapon as an assault rifle is a real problem for me.

What if you made the bullets invisible, like in real life? Just animate the flash of the gun and don’t worry about bullets… have you ever shot a (real) gun and saw bullets coming out of the barrel, cause I haven’t.

Use an invisible object to activate the collision sensor.

Nonono… You’re going about this the wrong way…
Use rays and python(getHitPosition() and getHitObject()). :wink:
I normally wouldn’t help another minigame contestant, but it’s for the betterness of the world. :wink:


import GameLogic as G

cont = G.getCurrentController()
own = cont.getOwner()

ray = cont.getSensor('ray') #assuming you have a ray sensor name 'ray'
msg = cont.getActuator('msg') #asuming you have a msg actuator named 'msg'

msg.setSubject(ray.getHitObject().getName())

And then you setup receiving objects with a blank message sensor names msg, and an actuator named end(which does whatever you want when the bullet hits), and this script:


import GameLogic as G

cont = G.getCurrentController()
own = cont.getOwner()

msg = cont.getSensor('msg')
end = cont.getActuator('end')

subject = msg.getSubject()
ownername = own.getName()
msg.setSubjectFilterText(ownername)

if msg.isPositive() and subject == ownername:
      G.addActiveActuator(end,1)

blah blah blah. If you learn python, you could come up with this stuff yourself. :smiley:

I usually have invisible planes behind it
the same width as the bullet and 3 or 4 squares long.

i set mine up with collisions.

If you look at my demo called The cave, you can see this sistem workin perfectly.

thanks everybody python is still totally unknown to me, and i use a half of the logic bricks…i have some more problems i would ask you the answers, but maybe in the future, or in other posts.

oh, i’m not a contestant
4give me for my very poor english