1 registered members (AndrewAMD),
1,403
guests, and 6
spiders. |
Key:
Admin,
Global Mod,
Mod
|
|
|
Re: collision system
[Re: jcl]
#210741
06/12/08 15:22
06/12/08 15:22
|
Joined: Feb 2007
Posts: 353
amy
OP
Senior Member
|
OP
Senior Member
Joined: Feb 2007
Posts: 353
|
How much longer and more complicated would that example be with correct gravity? I donīt need a full movement script. Just a simple example with gravity instead of setting the entity to the ground every frame. Like my script but without the problem that you can run up every slope. I would like to limit it to 45° or so. I understand what c_trace and c_move do but figuring out the reasons for problems like getting stuck isnīt always easy. This doesnīt only seem to be a beginner problem but if you look around on the forum a bit even Gamestudio experts often seem to have problems with this. that's probably what you mean with "simply push the ellipsoid around with gravity and everything". I mean this: c_move(my, vector((key_w-key_s)*10, 0, -10), nullvector, IGNORE_PASSABLE | GLIDE); Why canīt I just apply gravity at all times and have the ellipsoid correctly glide along the geometry? I think this would make it very easy to use. No need for extra traces. Some engines have a system which allows this. Read the discussion of clone45, damocles and jcl. Can you provide a link to this discussion?
|
|
|
Re: collision system
[Re: Pappenheimer]
#210757
06/12/08 17:35
06/12/08 17:35
|
Joined: Jan 2003
Posts: 4,615 Cambridge
Joey
Expert
|
Expert
Joined: Jan 2003
Posts: 4,615
Cambridge
|
of course, you're modyfing your bounding box because of sticking problems. that does not make sense at all because why should a smaller bounding box _not_ stick with your faulty code? That's not true. Read the discussion of clone45, damocles and jcl. It indeed makes much sense to let the box _not_ touch the ground, because it prevents the collision system from unnecessary computings. sorry for that, it must be my english. i wanted to express that it doesn't matter how big your collision hull is because you're already letting it flow 2 quants from the ground, that's why i said: the point is that you're checking the height for numbers higher than two. if your model begins at zero in model space then you can indeed add some number to your bounding box min_z value. nevertheless, try changing the following line:
move = accelerate(speed, (key_w - key_s) * 10, friction) * clamp(vec_dot(normal, vector(0, 0, 1))*2-1, 0, 1);
|
|
|
Re: collision system
[Re: Joey]
#210811
06/13/08 02:07
06/13/08 02:07
|
Joined: May 2008
Posts: 73 Richmond, VA (USA)
coma_dose
Junior Member
|
Junior Member
Joined: May 2008
Posts: 73
Richmond, VA (USA)
|
I know how you feel amy. I have posted about this lots and there doesn't seem to be a solution. Basically, you end up with everyone saying "use blocks" or something seriously substandard like that. I know what is causing the sticking.
Your entity is standing straight up like normal when it moves up a slope. Look at your bounding box (hit f11 twice). Notice that when you stick on a slope, a bounding box corner dips below ground? That is causing the sticking.
Decreasing the size of the bounding box alone won't help, the entity will just be pulled down more.
What you have to do is find a way to keep it from touching the ground at all, as stupid as that sounds, I found relief to this problem by decreasing the size of the bounding box so that the bottom cut across the ankles then added the same number that I decreased the bounding box size by to the result of the trace. You will find some sticking on REAL steep slopes because the bounding box still dips below the ground slightly.
P.s: Amy. Notice how there are 2 pages and no real solution? Also, I would like for anyone to show me a game made with this software that successfully implements a good solid 3rd person movement script that works on blocks, terrains, and models without some sort of system that limits the diversity (no gravity, completely flat level surfaces, etc.). The reason why is that it is just too darned hard, and that is the dirty little secret of this software. It seems almost designed to allow you to not produce the game that you want.
|
|
|
Re: collision system
[Re: jcl]
#210927
06/13/08 21:24
06/13/08 21:24
|
Joined: Feb 2007
Posts: 353
amy
OP
Senior Member
|
OP
Senior Member
Joined: Feb 2007
Posts: 353
|
Thanks! I am looking forward to your example. I just tried the walkthrough template and there are problems with getting stuck too. If I slowly move over one of the top corners of a ramp like that I get completely stuck and have to try hard to get free again. If not even Doug can do it without flaws (where is Doug by the way?) how are the users supposed to? It doesnīt seem to be as easy and straightforward as you claim after all. What you have to do is find a way to keep it from touching the ground at all, as stupid as that sounds, I found relief to this problem by decreasing the size of the bounding box so that the bottom cut across the ankles then added the same number that I decreased the bounding box size by to the result of the trace. Yeah, that was my idea too and except for the slopes it works better than the templates. I will experiment with tricks like Joey has suggested but I fear that this will introduce other problems. For example with gliding. Movement is one of the most important thing in games! If moving around isnīt flawless and fun then the game isnīt fun.
|
|
|
Re: collision system
[Re: amy]
#210928
06/13/08 21:30
06/13/08 21:30
|
Joined: Oct 2007
Posts: 5,210 Ä°stanbul, Turkey
Quad
Senior Expert
|
Senior Expert
Joined: Oct 2007
Posts: 5,210
Ä°stanbul, Turkey
|
i guess it's beacuse c_trace uses a ray and collision uses the box, the ray says entity is not zero to ground but box says it is.
3333333333
|
|
|
|