A few suggestions for the Ray Sensor

Game Engine, Players & Web Plug-in, Virtual Reality, support for other engines

Moderators: jesterKing, stiv

Post Reply
dmao
Posts: 5
Joined: Wed Apr 07, 2004 3:12 am
Location: New Orleans, LA

A few suggestions for the Ray Sensor

Post by dmao » Thu Sep 23, 2004 7:13 pm

I've been working with the Ray Sensor a lot lately and I've found some ways it could be greatly improved:

1) getHitMaterial()
This function would return the material being hit (obviously, I guess :)). It'd be great for things like ricocheting bullets- this would tell you if the material hit is wood, metal, concrete, etc. and let you change the sound accordingly. In my case, I'm projecting mouse gestures onto the scene with the raysensor and I need to know what they're hitting.


2) Ignore Materials, Objects, Properties
This would let the ray sensor ignore (pass right through) hits of a specific material, object, or property. Again I'm projecting mouse gestures and oftentimes they're blocked by the invisible collision geometry bounding my scenes or by the player's collision sphere. Having something like :

raysensor.setIgnoredMaterials( Boundaries, Foliage )
raysensor.setIgnoredObjects( Player )
raysensor.setIgnoredProperties( DontHitMe! )

...would allow the ray to pass through and hit the proper surfaces.

Thanks for listening :)

joeri
Posts: 96
Joined: Fri Jan 10, 2003 6:41 pm
Contact:

Post by joeri » Mon Sep 27, 2004 3:27 pm

With the raysensor.setIgnoredMaterials I think you mean for the current raysensor, not all raysensors and not all collision ?

dmao
Posts: 5
Joined: Wed Apr 07, 2004 3:12 am
Location: New Orleans, LA

Post by dmao » Tue Sep 28, 2004 1:11 am

Of course. Making it effect all raysensors would be... bad :). Anyways, useful feature, no?

animats
Posts: 15
Joined: Fri Nov 08, 2002 8:18 pm

Post by animats » Tue Oct 12, 2004 6:50 pm

While we're on the subject of the ray sensor, what are the known bugs there? Is is still restricted to the +Y direction? Does "getHitPosition()" return correct values? (I'm getting the location of the sensor itself from getHitPosition()") Does the range limit work? Thanks.

Post Reply