Author Topic: Questions about how model intersect triggers, gateways and lines.  (Read 3799 times)

Akari

  • *
  • Posts: 766
    • View Profile
Questions:

1) When they are activated? When central point cross the line or when line intersect some box around model. And if it is the box - what are size of this box?

2) Are the height of line have some meaning, or it activated even if trigger on next floor? If not, what are the height of model on which it activated?

Cyberman

  • *
  • Posts: 1572
    • View Profile
I believe you should check your events.
In particular the Save points.
In the save points case it allows the person to walk through it right?
My guess is it depends if the object has a walk through flag set.
Also you want to use the bounding box.  The bounding box is likely calculated when the 3d data is loaded.  It is also centered about the center of the model.
I believe you are dealing with a 3d collision not a heigh issue (bounding box above)
Another example is the elevator in Sector 7's Avalance hideout.  Look at it's cood.
Another example is the sector 6 train graveyard when you pass through there to get to sector 7 with Aeris. (you have to move trains but you enter both of them to move them).  My guess is both are a bounding box issue.  The object likely also takes care of moving the player in it's code.

Cyb

Synergy Blades

  • Guest
Quote
My guess is it depends if the object has a walk through flag set.

SOLID opcode used in its initialisation script, set to off. In addition, the particular script number the save point uses to play a sound, show a dialog etc. (5, perhaps? I don't have the details here) allows it to be executed only once as the player passes through it. Other script numbers have different effects, such as executing when the player presses OK (2), playing repeatedly as the player passes through it, etc.
« Last Edit: 2006-10-08 14:39:34 by Synergy Blades »

Akari

  • *
  • Posts: 766
    • View Profile
I have a lot of thoughts lately... I think they didn't use bound box after all. But I need final tests. Can someone define Line and check when ot is activated (when central point cross the line or earlier)... also this related to walkmesh... when character stops, when central point try to cross the border of triangle of ealier? Ealier means they use bound box, if it activate/stops when central point try to cross it - then there is no such thing.

Also this related to characters. I think there are two value: one are the talking range and other are stop range. If you try to move to distance less then stop range - then characters not move. If you are in talking range and press button - dialog script start.

Any thoughts?

to Synergy Blades: please try this with line opcode... I have only PSX version so I can't check my thoughts.

Synergy Blades

  • Guest
Will do, I'm at uni right now so will check it when I get back home. I'd have thought the simplest way to define a stop range would be a bounding box, but maybe you're right. One thing to try might be a charcter like Red who's quite "long", if it's the central point tested against the boundary then Red would theoretically be able to move further across the boundary than a tall, thin model, like any of the human characters.

[Edit] The field models are in .P format, right? According to Mirex's documentation on it, there is a bounding box, can't think what else it might be used for.
« Last Edit: 2006-10-16 14:01:49 by Synergy Blades »

Akari

  • *
  • Posts: 766
    • View Profile
The field models are in .P format, right? According to Mirex's documentation on it, there is a bounding box, can't think what else it might be used for.

Accorging to Gears this is the bound box in P files

typedef struct
{
float max_x;
float max_y;
float max_z;
float min_x;
float min_y;
float min_z;
} t_p_boundingbox;

it's just two points... top and bottom value (to test height?) Strange....

Alhexx

  • *
  • Posts: 1894
    • View Profile
    • http://www.alhexx.com
Quote from: Akari
it's just two points... top and bottom value (to test height?) Strange....
Yes, the bbox in the .p format is just 2 points.
But with these 2 points you can generate the coordinates of the corners of the "real" bbox.

Maybe a 2D-example?
Code: [Select]
D----C
|    |
|    |
A----B
The BBox in .p format would just save point A and point C, since B and D can be calculated from A and C:
B_x = C_x; B_y = A_y;
D_x = A_x; D_y = C_y;

 - Alhexx

 - Edit -
Here's the 3D example:
Code: [Select]
  H----G
./|   /|
D-+--C |
| E--+-F
|/   |/
A----B
The bbox in the .p file would just save point A as min and point G as max, since all other points can be recalculated from A and G.
« Last Edit: 2006-10-16 17:09:41 by Alhexx »

Synergy Blades

  • Guest
How long did you spend typing that model out?   :lol: