OBB gives me a headache

Posted By: 3run

OBB gives me a headache - 02/12/13 17:08

WTF is wrong with it.. It makes me go crazy with it's nuts collusions!

Situation:
Quote:
Passing throw fucking door #1:

Passing throw fucking door #2:



Things that I'm aware from:
- player's bounding box doesn't touch the ground
- player's bounding box changed manually, but it's X and Y are symmetrical
- door has "c_setminmax(my)" with "wait(1);" at the beggining
- door has POLYGON flag on!

SO WHAT THE FUCK IS WRONG WITH THE DOOR??
When I open it into opposite direction (pan > 0), the collusions are OK! But when pan goes under the 0, it goes crazy like this, what am I doing wrong?


Edit: if demo is needed, I can upload! door rotates via "c_rotate"!
Posted By: Superku

Re: OBB gives me a headache - 02/12/13 17:57

Haha although I can understrand your frustration I suggest you try to approach (movement) coding without anger and fury but with patience and an analytical spirit of research. Movement codes are, despite the common believe, a non-trivial thing and won't simply work just using c_move (or any other movement function in another engine) and a few lines of code and a few minutes of work. Normally they need months of work until they function properly and smoothly.

Regarding your problem: A demo would be nice.
Posted By: Carlos3DGS

Re: OBB gives me a headache - 02/12/13 17:59

I am trying to figure out what is going wrong but it is hard to understand what is going on in the pictures
Posted By: 3run

Re: OBB gives me a headache - 02/12/13 18:41

Please notice, that door can even disappears, because player can pass inside of it:
Quote:
The door is visible:

The Door is gone!!!

Posted By: Superku

Re: OBB gives me a headache - 02/12/13 19:07

Add
my.min_x = -10;
my.max_x = 10;
in your door action after c_setminmax and it works like a charm. Remember, you are working with ellipsoids, not boxes, the blue boxes drawn by F11/ default.c will thus normally overlap all the time.
Posted By: 3run

Re: OBB gives me a headache - 02/12/13 19:19

Yes, it works, thank you man. So to make things clear, I better don't use thin bounding boxes models?
Posted By: Superku

Re: OBB gives me a headache - 02/12/13 19:35

Hm I don't think there is or should be a general rule to not use thin models (/ bounding boxes), I think it always depends on the situation. In first person games you have to take a little special care because your camera is not a single point but a/ the near clip plane. If your player model/ bounding box is rather thin you thus may be able to look through a wall/ door if you stand really close to it and if it is somewhat parallel to the view direction.
Posted By: 3run

Re: OBB gives me a headache - 02/13/13 06:18

Superku@ things getting more clear now, thank you man, I appreciate your help.

Edit: one more question, related to collusion with doors. when you walk towards the corners of the door:

Movement gets jerking, why is that? Shouldn't POLYGON fix this kind of collusion problems with models?
I can see that there is that pit, on the edges, where player gets stuck. But he is like bouncing when I walk towards it?

I would really appreciate, if someone could give me some explanation about this issue as well.


Edit2: I could fix this problem by making the door slightly thicker, so that pit differences between wall and door a is gone, but it doesn't really look good, as door become giant! grin
Posted By: Carlos3DGS

Re: OBB gives me a headache - 02/13/13 11:40

mabe you could keep the door itself thin but make the collision hull bigger? (just an idea, but I don't think that would work if you use the polygon flag)
Posted By: 3run

Re: OBB gives me a headache - 02/13/13 11:50

Carlos3DGS@ I have a workaround, like making INVISIBLE bounding box and parent PASSABLE visual model. But I wanted to hear something faster than my solution laugh
Posted By: Superku

Re: OBB gives me a headache - 02/13/13 14:38

The reason for the jittering is the GLIDE parameter. When you touch the door first you will glide to the left and then along the wall which moves you a little backwards from the door. In the next frame you will glide along the wall, then the door and thus move a little to the right.
Posted By: 3run

Re: OBB gives me a headache - 02/13/13 15:13

Yes, I've noticed that as well. If I increase the "move_friction" then jerking stops. Thank you guys.
© 2024 lite-C Forums