FPS help needed: bullets and crosshair

setup:
i made a crosshair with an overlay scene
and the bullet is in a second scene and gets created by an Empty in the main scene
bullet has an always sensor connected with a motion-actuator (bullet flies always along the y-axis with a velocity of 30)

my problem:
bullet cant follow the crosshair and the bullet cant be shot along the z-axis
so it flies always in the same height

any clues?
what can i do?

i seem to remember a tutorial on bullet physics but d not recall were i saw it, sorry but if you find it post a link here

Bullet can’t follow the cross hair?
Is the cross hair in a separate overlay scene?

Here’s what I mean…

Attachments

FPSDemo.blend (568 KB)

yes the crosshair is in a separate overlay scene

So what’s your problem?
Sorry I don’t really understand:
You want your bullet to shoot straight, and it won’t?

the bullets dont fly in the direction of my crosshair
shall i send u my .blend-file?

project_success_bullet.blend (657 KB)

heres the blend-file

Ah, I see the problem now.
My advice? Use Rays, - here’s why.
You can cast a ray from your camera, this will mean anything in the ‘crosshair’ will get hit by the ray.
Here’s a tutorial by Goran Milovano

yeah thx :smiley:

do u mean that i should use rays instead of bullets?

i cant use the rays instead of the bullets because later i want to use fireballs instead of the bullets and u need to see the fireballs

Im pretty sure a ball of fire wouldn’t react like a bullet so the player won’t expect it to go perfectly straight.

so i can use a ball or a bullet with the ray sensor?
i thought the ray sensor is just like an invisible line an you can only make bulletholes without bullets xP

It casts an ‘invisible’ line (you can make it visible though). It can be used as a bullet,
If your enemy is in line with the ray and you press shoot, it dies…

can i make a mesh-bullet flying on that invisible line?
its crucial that u can see the bullet while flying