Please login or register.

Login with username, password and session length
Advanced search  

News:

This forum provides RSS feed. To query recent posts use this url. More...


Author Topic: Simple geometrical question  (Read 2117 times)

0 Members and 1 Guest are viewing this topic.

Skylynx

  • Lurker
  • *
  • Karma: 0
  • Offline Offline
  • Posts: 2
    • View Profile
Simple geometrical question
« 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) ?
Logged

Amo

  • Supporter
  • Regular poster
  • *
  • Karma: 0
  • Offline Offline
  • Gender: Male
  • Posts: 206
    • View Profile
    • Sunrise The Game
Re: Simple geometrical question
« Reply #1 on: September 19, 2007, 08:43:24 PM »

You can simply check it in the scene editor. Or did I miss something?

Skylynx

  • Lurker
  • *
  • Karma: 0
  • Offline Offline
  • Posts: 2
    • View Profile
Re: Simple geometrical question
« Reply #2 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?
Logged

Mnemonic

  • WME developer
  • Administrator
  • Addicted to WME forum
  • *
  • Karma: 41
  • Offline Offline
  • Gender: Male
  • Posts: 5683
    • View Profile
    • Dead:Code Site
Re: Simple geometrical question
« Reply #3 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.
Logged
Yes, I do have a twitter account
Please don't send me technical questions in private messages, use the forum. ::wave
 

Page created in 0.029 seconds with 19 queries.