Wintermute Engine Forum

Wintermute Engine => Technical forum => Topic started by: Skylynx on September 18, 2007, 06:41:57 PM

Title: Simple geometrical question
Post 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) ?
Title: Re: Simple geometrical question
Post by: Amo on September 19, 2007, 08:43:24 PM
You can simply check it in the scene editor. Or did I miss something?
Title: Re: Simple geometrical question
Post by: Skylynx on September 26, 2007, 10:36:49 AM
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?
Title: Re: Simple geometrical question
Post by: Mnemonic on September 26, 2007, 11:30:29 AM
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.