In my game, the camera is fixed at a 45 degree angle behind the player. I'm using ray casting to ghost out objects that interfere with the camera viewing the player.
This has worked so far, but now, I've hit a snag.
It seems to me that the ray cast is returning triggers as valid objects in the ray cast. Is this supposed to happen??
In my code, when the ray detects an object between the camera and the player, it will ghost the object, reposition it out of view, and run the ray cast again, until there are no more objects between the camera and player. Afterwards it repositions all the objects back to where they were, so that I am left with a line of ghosted objects and I can easily view my player at all times.
Now... to reposition the object, I use the "phy set rigid body position" command in conjunction with the results from "phy get ray cast object". However, when the ray cast detects a trigger it's returning the ID of the trigger... not a rigid body. This means, the trigger never gets moved out of the way and program freezes.
So, my question is: How do I prevent ray casts from detecting triggers?
The one and only,