Please login or register.

Login with username, password and session length
Advanced search  

News:

For WME related articles and tutorials visit WME Resource Center.

Author Topic: 2 and more actors. Collision detection?  (Read 5024 times)

0 Members and 1 Guest are viewing this topic.

Helgiii

  • Lurker
  • *
  • Karma: 0
  • Offline Offline
  • Gender: Male
  • Posts: 18
    • View Profile
2 and more actors. Collision detection?
« on: February 04, 2008, 10:21:49 AM »

What are the existing or recommended methods for doing this kind of stuff?
I want to have 2 actors as my game heroes.. want to switch them using LMBTN..
at the moment I can load them, switch between them, but they pass through each other...
I thought I could add a blocking region just under the current actor's feet when I switch to the other one..
but this could cause some troubles ... I mean if this block happens to be placed on the way between 2 waypoints..
or to be blocking a small single pass..
the second actor would get stuck..

any suggestions or alternatives? thanx in advance
« Last Edit: February 04, 2008, 04:26:22 PM by Helgiii »
Logged

Helgiii

  • Lurker
  • *
  • Karma: 0
  • Offline Offline
  • Gender: Male
  • Posts: 18
    • View Profile
Re: 2 and more actors. Collision detection?
« Reply #1 on: February 04, 2008, 05:11:34 PM »

We should take scaling into account..
gotto scale down the region if the actor is somewhere in the rear of the scene.
Has anybody done anything like this?
Logged

Mnemonic

  • WME developer
  • Administrator
  • Addicted to WME forum
  • *
  • Karma: 41
  • Offline Offline
  • Gender: Male
  • Posts: 5683
    • View Profile
    • Dead:Code Site
Re: 2 and more actors. Collision detection?
« Reply #2 on: February 04, 2008, 05:12:28 PM »

2D actors or 3D actors?
Logged
Yes, I do have a twitter account
Please don't send me technical questions in private messages, use the forum. ::wave

Helgiii

  • Lurker
  • *
  • Karma: 0
  • Offline Offline
  • Gender: Male
  • Posts: 18
    • View Profile
Re: 2 and more actors. Collision detection?
« Reply #3 on: February 05, 2008, 09:31:54 AM »

2d actors
Is there any difference between them, I mean considering the collision-detection issue?
Logged

Mnemonic

  • WME developer
  • Administrator
  • Addicted to WME forum
  • *
  • Karma: 41
  • Offline Offline
  • Gender: Male
  • Posts: 5683
    • View Profile
    • Dead:Code Site
Re: 2 and more actors. Collision detection?
« Reply #4 on: February 05, 2008, 11:57:44 AM »

Yup, 2D actors provide sort of a built-in collision detection (albeit undocumented). See this post for details.
Logged
Yes, I do have a twitter account
Please don't send me technical questions in private messages, use the forum. ::wave

Helgiii

  • Lurker
  • *
  • Karma: 0
  • Offline Offline
  • Gender: Male
  • Posts: 18
    • View Profile
Re: 2 and more actors. Collision detection?
« Reply #5 on: February 05, 2008, 03:21:28 PM »

Thanks, that's what I was looking for..
aspecially defining 4 waypoints around the blocking region's corners
Logged

Shazzner

  • Supporter
  • Lurker
  • *
  • Karma: 0
  • Offline Offline
  • Posts: 2
    • View Profile
Re: 2 and more actors. Collision detection?
« Reply #6 on: February 28, 2008, 03:20:12 AM »

Question: I want to have one actor "chase" the other and if the chasor meets the chasee then it triggers an event (ie. A player running from a badguy; if player gets caught he dies). How would I make an "ActorEntry" event trigger to those run-time regions?
Logged

metamorphium

  • Global Moderator
  • Addicted to WME forum
  • *
  • Karma: 12
  • Offline Offline
  • Gender: Male
  • Posts: 1511
  • Vampires!
    • View Profile
    • CBE  software s.r.o.
Re: 2 and more actors. Collision detection?
« Reply #7 on: February 28, 2008, 08:54:42 AM »

Simply take actor1.X and actor1.Y and actor2.X and actor2.Y and if they are close enough, the chase is over, isn't it?
Logged
J.U.L.I.A. Enhanced Edition, Vampires!, J.U.L.I.A., J.U.L.I.A. Untold, Ghost in the Sheet

Shazzner

  • Supporter
  • Lurker
  • *
  • Karma: 0
  • Offline Offline
  • Posts: 2
    • View Profile
Re: 2 and more actors. Collision detection?
« Reply #8 on: February 28, 2008, 07:50:54 PM »

Simply take actor1.X and actor1.Y and actor2.X and actor2.Y and if they are close enough, the chase is over, isn't it?
Ok now I feel like an idiot, I didn't know X and Y were members.

Excellent engine you got here consider me a donor! :)
Logged
 

Page created in 0.046 seconds with 20 queries.