Gamestudio Links
Zorro Links
Newest Posts
Zorro 2.70
by jcl. 09/29/25 09:24
optimize global parameters SOLVED
by dBc. 09/27/25 17:07
ZorroGPT
by TipmyPip. 09/27/25 10:05
assetHistory one candle shift
by jcl. 09/21/25 11:36
Plugins update
by Grant. 09/17/25 16:28
AUM Magazine
Latest Screens
Rocker`s Revenge
Stug 3 Stormartillery
Iljuschin 2
Galactic Strike X
Who's Online Now
3 registered members (NewbieZorro, TipmyPip, AndrewAMD), 14,749 guests, and 7 spiders.
Key: Admin, Global Mod, Mod
Newest Members
krishna, DrissB, James168, Ed_Love, xtns
19168 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Stuck when Crouching #386336
11/01/11 21:23
11/01/11 21:23
Joined: Mar 2009
Posts: 186
V
Valdsator Offline OP
Member
Valdsator  Offline OP
Member
V

Joined: Mar 2009
Posts: 186
I just added crouching to my game, which obviously changes the bounding box of the player. For some reason, whenever the player crouches while moving up a slope, he's not able to move forward for a few seconds. I played around with this, and it's obvious that this has to do with the bounding box changing, but I can't seem to find anything in my code that would cause this, making me believe that this is simply how the engine works.

What happens when an entity has it's bounding box changed? Could this be the reason the player can not move upwards for a bit? Can I get around this?

Re: Stuck when Crouching [Re: Valdsator] #386341
11/01/11 22:01
11/01/11 22:01
Joined: May 2008
Posts: 2,113
NRW/Germany
alibaba Offline
Expert
alibaba  Offline
Expert

Joined: May 2008
Posts: 2,113
NRW/Germany
i´m sure, that the bounding box is going inside the ground. make sure that this doesn´t happen.


Professional Edition
A8.47.1
--------------------
http://www.yueklet.de
Re: Stuck when Crouching [Re: Valdsator] #386342
11/01/11 22:03
11/01/11 22:03
Joined: Mar 2003
Posts: 1,524
Canada
Stansmedia Offline
Serious User
Stansmedia  Offline
Serious User

Joined: Mar 2003
Posts: 1,524
Canada
If your bounding box is touching the slope then that could be it. The bounding box should only go down to about knee height. Use c_trace (with Use_box set) to add gravity and keep the feet on the ground.

Last edited by Stansmedia; 11/01/11 22:05.

Decessus - 80% done. 100% abandoned.
GET MY ANDROID GAME! https://play.google.com/store/apps/details?id=com.lasertrain.zspinballfree&hl=en
Re: Stuck when Crouching [Re: Stansmedia] #386357
11/02/11 01:35
11/02/11 01:35
Joined: Mar 2009
Posts: 186
V
Valdsator Offline OP
Member
Valdsator  Offline OP
Member
V

Joined: Mar 2009
Posts: 186
I'm already using c_trace with USE_BOX to take care of all the slope walking and stair climbing, but the bounding box still goes to the feet because otherwise there are problems with getting stuck on ledges, and I would need another bounding box to make sure bullets could hit the player's feet. Anyway, wouldn't changing the bounding box change how USE_BOX affects the c_trace? This might be the problem.

I attempted to change the bounding box right before the main c_trace, and then change it back, but that just screwed it all up.

EDIT: Although, it seems that you're right. The bounding box is simply getting stuck, but that seems weird. I'm only changing the top of the bounding box, not the bottom.

Last edited by Valdsator; 11/02/11 01:39.
Re: Stuck when Crouching [Re: Valdsator] #386382
11/02/11 09:17
11/02/11 09:17
Joined: May 2009
Posts: 5,377
Caucasus
3run Offline
Senior Expert
3run  Offline
Senior Expert

Joined: May 2009
Posts: 5,377
Caucasus
Take a look at my website, there is a working crouching example, it might help.


Looking for free stuff?? Take a look here: http://badcom.at.ua
Support me on: https://boosty.to/3rung
Re: Stuck when Crouching [Re: 3run] #386441
11/02/11 23:19
11/02/11 23:19
Joined: Mar 2009
Posts: 186
V
Valdsator Offline OP
Member
Valdsator  Offline OP
Member
V

Joined: Mar 2009
Posts: 186
Alright, fortunately I separated how vertical movement worked in to 2 "modes," depending on if you're on flat ground or a slope. So, it was very easy to add in the slope section that if the player is crouching, player.z should = on the slope (rather than a bit below it), making him unstuck. Thanks everyone!


Gamestudio download | Zorro platform | shop | Data Protection Policy

oP group Germany GmbH | Birkenstr. 25-27 | 63549 Ronneburg / Germany | info (at) opgroup.de

Powered by UBB.threads™ PHP Forum Software 7.7.1