Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Newcomers DBPro Corner / Crouching.. prevent the player to stand up if under something?

Author
Message
JJJ0han
16
Years of Service
User Offline
Joined: 4th Oct 2007
Location: Brisbane, Australia
Posted: 12th Oct 2007 11:32
I managed to create my own simple crouching system, good or not, it seems to work reasonably well.

Anyway, the thing I'm asking is, how can I prevent the player from automatically standing up, or in that case, stand up at all, when he or she is under something?

Here's the crouch code:


No need to clean it up, it seems to be fine for me.

Also, I'm guessing the answer lies with ray casting, but I'm not sure what that is so if that is what I'm gonna have to do considering I have Sparky's DLL, then I'd like a bit of help with it so I can understand it.
DB PROgrammer
17
Years of Service
User Offline
Joined: 9th Feb 2007
Location: Nowhere But Everywhere
Posted: 12th Oct 2007 17:40
This should work but I did not test it. If it doesn't work it is at least the basic idea.


I keep runing nowhere fast!
JJJ0han
16
Years of Service
User Offline
Joined: 4th Oct 2007
Location: Brisbane, Australia
Posted: 15th Oct 2007 11:19
It seems to be flickering a bit when the player attempts to crouch under an obstacle.

Not really sure how to describe it. But all I can say it isn't working .

Anyway here's what I got with the code:

Login to post a reply

Server time is: 2024-09-27 05:08:21
Your offset time is: 2024-09-27 05:08:21