Sneaking past guards

Blitz3D Forums/Blitz3D Beginners Area/Sneaking past guards

The forum is locked. These are the original blitzbasic.com forums, kept so they can still be read. No new topics, replies or edits can be made here. To join in, head over to the Blitz3D+ forums.

You could create a mesh shaped like a cone, hide it and place it at the guard's eyeline. Finally, parent it to the guard's head bone. Now you have a real cone of vision, which even follows the animation of the guard moving his head.

Then you can just create a sphere which approximates the size of the player and see if that sphere intersects your cone of vision, the player can be seen. If not, he can't. Should be plenty fast and accurate.