Ray Shooting Tut Help

where can i find a ray shooting tut that fits with the current version… all i find are older ones or ones that are unclear… please show me one:(:spin: TY:cool:

Are you talking about the Ray sensor?

Because its really quite simple once you understand it.

The ray sensor pretty much (as the name suggests) shoots out a ray which detects the properties or materials of a single (or multiple) objects in its path. If that detection comes back as ‘true’ then a pulse is sent and whatever is attached to the Ray sensor (ie a controller and actuator(s)) and the actuators action is activated.
http://img87.imageshack.us/img87/6029/raybh.jpg

The M/P button toggles between materials or properties depending on which of the 2 your looking to detect with the ray sensor.

The field next to that (In the image is the Property: field) is where you put the name of the property/material which your looking for the sensor to detect.

The X button toggles wether or not the ray can pass though other objects like an X-ray.

The range is… the range the ray travels. :wink:

The drop down menu next to the range is the direction the ray will shoot out.

Thats all you need to know really. I can post a .blend example of the ray sensor in action if youd like.
And if you meant something completely different then just explain it a bit better and I’ll try to answer it! Im thinking you may have been asking about how to make a gun shoot lazers or something? Maybe? I dont know lol

Anyways hope that helped. :yes:

a .blend would be appreciated… thanks :wink:

OK heres a .blend.
Ray.blend (159 KB)

Press space to shoot spheres. The cube is setup to detect (using its ray sensor) the property Enemy, which all the spheres have.
So when the cube detects the Enemy property it triggers a motion actuator that makes it jump up into the air.

The line coming out of the cube is showing you which direction the Ray is pointing, in this case its the +Y direction (Default)