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: 3D actor's blocking region doesn't work as expected  (Read 1400 times)

0 Members and 1 Guest are viewing this topic.

Sothoth

  • Lurker
  • *
  • Karma: 0
  • Offline Offline
  • Gender: Male
  • Posts: 29
    • View Profile
3D actor's blocking region doesn't work as expected
« on: July 27, 2013, 12:52:53 AM »

Hi!

I just realized that two 3D actors can collide when they shouldn't. I've tested it using the following scenario:

I have a player character (PC) and a (non-playable character) NPC, two Trinity model copies (from the 3D demo). The player controls one Trinity, and the other Trinity walks automatically from one side of the scene to the other, using the following code:

Code: WME Script
  1. while (true)
  2. {
  3.     trinity2.GoTo(150, 480);
  4.     Sleep(200);
  5.     trinity2.GoTo(600, 480);
  6.     Sleep(200);
  7. }

Both Trinitys have the same blocked regions and waypoints in their .act3d file:

Code: WME Script
  1.   BLOCKED_REGION
  2.   {
  3.       POINT {  0,-50}
  4.       POINT { 500}
  5.       POINT {  0, 50}
  6.       POINT {-500}
  7.   }
  8.  
  9.   WAYPOINTS
  10.   {
  11.       POINT {  0,-55}
  12.       POINT { 550}
  13.       POINT {  0, 55}
  14.       POINT {-550}
  15.   }

I have a very simple geometry (one only walk plane, one camera and one omni light) and the scene has the "2D pathfinding" enabled.

So, if the PC is in any midpoint in the NPC path, and it's still (non-walking) then the NPC circumvents the PC to avoid colliding with it. That's OK.

However, if the PC is in move (walking), the NPC walks through the PC without collision. Moreover, sometimes both PC and NPC ends their walk movements in the same place, and, if this is the case, both PC and NPC gets stuck and they will not move anymore (I suppose that PC enters into the NPC's blocked region and vice versa, so they can't move).

I'm just guessing, but I think the engine doesn't check 3D actor's personal blocked region when in move, or maybe the check is done only once, just before the GoTo(), and never re-check any possible change in any movable blocked region during the GoTo() execution.

2D actor collision detection seems to work OK, though.

Any clues?

Thank you very much in advance.
« Last Edit: July 27, 2013, 01:08:31 AM by Sothoth »
Logged
Sorry for my poor English! :(
 

Page created in 0.172 seconds with 17 queries.