hitObject through non visible object

I wonder if there is a way to hitObject with Mouse sensor through another object with visibility set to False.

I tried to play with occlusion culling but with no results.

I need to find a way to set dynamically an object invisible to MouseOver.hitObject. I can’t use the actuator Edit Object -> End Object because i need to respawn the owner and his children.

Anyone has an idea?

Just to add human readable details: i would like to create a box containing objects, when the box disappears the objects can be selectionable otherwise no. The box can be a group of parented objects and i would like to hide some or all of them.

you could try to get the Mouse hitPosition and then RayCastTo or RayCast from there along a point behind…
behind point a - point a - point b- behind point b…

google for rayCast in the api

thank for the tip!

Just to be sure, does exist a way to change a ‘STATIC’ object to ‘NO-COLLISION’ on the game?

I tried to use rayCast, but I can’t understand why instead of getting the first object it takes the floor (last object hit?)

Please help!

Attachments

test.blend (692 KB)

ok solved! I inverted the arguments :slight_smile: