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 / anyone know how i can make my player climb any mesh thats 90 degrees like a wall?

Author
Message
David iz cool
19
Years of Service
User Offline
Joined: 21st Sep 2005
Location: somewhere lol :P
Posted: 17th Jul 2007 19:55
title says it all.

i want my player to be able to climb any wall (mesh thats 90 degrees) how can i detect this??
Zotoaster
19
Years of Service
User Offline
Joined: 20th Dec 2004
Location: Scotland
Posted: 17th Jul 2007 20:13
Hmm, well usually when I make games, I get a simple physics thing going with gravity. If you could have a seperate gravity vector for each player, you can just multiply the gravity level by the normal of the wall. It's easy to get that using Sparky's.

"It's like floating a boat on a liquid that I don't know, but I'm quite happy to drink it if I'm thirsty enough" - Me being a good programmer but sucking at computers
Scorpyo
22
Years of Service
User Offline
Joined: 26th Aug 2002
Location: italy
Posted: 17th Jul 2007 20:35
to detect if it is 90 degrees it you could cast a ray with intersect object command a 2 different heights and compare values
see pic

Attachments

Login to view attachments
David iz cool
19
Years of Service
User Offline
Joined: 21st Sep 2005
Location: somewhere lol :P
Posted: 17th Jul 2007 21:23
could i see a small code sample?
Scorpyo
22
Years of Service
User Offline
Joined: 26th Aug 2002
Location: italy
Posted: 18th Jul 2007 01:06
Basic Idea, no fine tuning

David iz cool
19
Years of Service
User Offline
Joined: 21st Sep 2005
Location: somewhere lol :P
Posted: 18th Jul 2007 22:33
thank you very much scorpyo!!!!

im studying your code to try and figure out how it works

thankyou!
Scorpyo
22
Years of Service
User Offline
Joined: 26th Aug 2002
Location: italy
Posted: 18th Jul 2007 23:14 Edited at: 18th Jul 2007 23:18
It's really in a very "spaghetti code" form.
It lacks the routine for backward movement ( the "if s#<0.." case ) and the camera is not tailored to the fall off situation.
Also, if you don't need to recognize strictly vertical 90 degrees walls there's no need for casting 2 rays (upper and lower) one would be enough to climb over.
I planned to refine it today but got no time at all.
cheers

Login to post a reply

Server time is: 2024-09-27 02:19:55
Your offset time is: 2024-09-27 02:19:55