3 registered members (NewbieZorro, TipmyPip, 1 invisible),
19,045
guests, and 8
spiders. |
Key:
Admin,
Global Mod,
Mod
|
|
|
Re: collision system
[Re: coma_dose]
#211475
06/16/08 21:07
06/16/08 21:07
|
Joined: May 2002
Posts: 7,441
ventilator
Senior Expert
|
Senior Expert
Joined: May 2002
Posts: 7,441
|
i also can reproduce the problem with ramps. test.zipyou just have to move forwards with w and see what happens. additionally you can get stuck at the top right corner of the ramp.
|
|
|
Re: collision system
[Re: ventilator]
#211526
06/17/08 06:21
06/17/08 06:21
|
Joined: Jul 2000
Posts: 28,024 Frankfurt
jcl

Chief Engineer
|

Chief Engineer
Joined: Jul 2000
Posts: 28,024
Frankfurt
|
A usual beginner's mistake is extending the entities' bounding box all the way to its feet Ventilator - just read the comments in the manual: if your entity is too small, as is the case with your egg in your level, its default bounding box goes down all the way to its feet and you have to fix that. vec_scale(my.min_x,0.7); vec_scale(my.max_x,0.7); Otherwise the code example permanently presses the BBOX on the ground and gets your entity stuck on any edge on the floor. The c_move code example was for players in the standard size, as our actor models, not for eggs! Still, if anyone has a level with a normal player where my movement example does not work, please upload it and I'll fix it. You can easily see bounding boxes by pressing [F11] twice.
|
|
|
Re: collision system
[Re: jcl]
#211528
06/17/08 06:38
06/17/08 06:38
|
Joined: May 2002
Posts: 7,441
ventilator
Senior Expert
|
Senior Expert
Joined: May 2002
Posts: 7,441
|
it's supposed to be an ellipsoid not an egg!  and it isn't very small but has about the same size as the gamestudio character models. making the ellipsoid smaller seems to fix the getting stuck problems but how could i solve the slope problem then? move_min_z doesn't have any effect anymore with this method since the ascending happens because of the c_trace calculations and not because of c_move gliding. it's possible to move up almost vertical walls. can this be fixed in a simple way? without breaking nice gliding behaviour?
|
|
|
Re: collision system
[Re: ventilator]
#211545
06/17/08 08:10
06/17/08 08:10
|
Joined: Jul 2000
Posts: 28,024 Frankfurt
jcl

Chief Engineer
|

Chief Engineer
Joined: Jul 2000
Posts: 28,024
Frankfurt
|
You could not move fully into the geometry, but you could move into it until the bounding boxes touch. The code example then would not move you out of it.
I may be wrong, but as far as I know all sticking problems are caused by wrong bounding boxes and can easily be avoided when following the suggestions under "Remarks" in the manual. All our examples and templates use basically the same simple algorithm. When the bounding box is so big that it touches the floor, the height adjustment permanently attempts to push it further downwards. Because the entity can not glide downwards deeper than its bounding box, it will become stuck as soon as it encounters two planes that intersect in an acute angle with the floor. That's not a bug, it's just mathematics.
Therefore, either make sure that the bounding box is ok, or use a different movement algorithm. As to my knowledge, Doug's new T7 movement template also works with a fully extended bounding box.
|
|
|
|