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
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
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…