Wintermute Engine Forum
Wintermute Engine => Technical forum => Topic started by: Skylynx on September 18, 2007, 06:41:57 PM
-
Does anybody have an idea about how I can check whether one actor is behind another, or maybe find out if an actor is standing within a certain region (which is behind the other actor) ?
-
You can simply check it in the scene editor. Or did I miss something?
-
I guess you did miss something, AMO :)
I meant during runtime. I want one actor to actually know when another one is in its 'eyesight'.
I defined a region which symbolizes the part in which the second actor should be considered 'hidden'. However, once the second actor is there, I don't know how to check programmatically whether he's in that region or not.
Is there such a possibility?
-
Two ways. Either use the Scene.GetRegionAt() method, passing it the coordinates of the actor, or use the region's events "ActorEntry" and "ActorLeave" to keep track of whether the actor entered/left your region.