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.

3 Dimensional Chat / Sliding down hills

Author
Message
Strife
21
Years of Service
User Offline
Joined: 11th Dec 2002
Location:
Posted: 12th Dec 2002 02:57
In my game im making, i have a real big problem with indentifing if a hill is too steep for my character to climb. Im also trying to have it so my character if he trys jumping onto a hill too steep that he will slide down it. Can anyone tell me how to do this?
Shadow Robert
21
Years of Service
User Offline
Joined: 22nd Sep 2002
Location: Hertfordshire, England
Posted: 12th Dec 2002 03:58
gravity
and yeah some nice sliding collision would probably help too hehee

there's a demo within DarkBasic 1.1x help about sliding collision check it out

Anata aru kowagaru no watashi!
Strife
21
Years of Service
User Offline
Joined: 11th Dec 2002
Location:
Posted: 13th Dec 2002 01:37
Yeah, but how do you indentify how steep a hill is on a matrix. The example they give is only on boxes and not on hills.

Shadow
21
Years of Service
User Offline
Joined: 17th Oct 2002
Location: In the shadows
Posted: 15th Dec 2002 20:46
All you have to do is get ground height where your character is, just to the right of your character and just in front of your character. You should subtract them to get a (sort of) gradient:



Then from gradient values, you can work out which way your character should slide and how fast.

I made a program to do sliding. It might still be in the code snippet forum.

Login to post a reply

Server time is: 2024-04-25 15:20:11
Your offset time is: 2024-04-25 15:20:11