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.

Dark Physics & Dark A.I. & Dark Dynamix / can someone help me? i need to be able to detect the angle of a slope

Author
Message
David iz cool
19
Years of Service
User Offline
Joined: 21st Sep 2005
Location: somewhere lol :P
Posted: 17th Dec 2009 15:31
my player is a character controller.
i dont want it to be able to walk down a steep slope, instead i want it to tumble & fall down the steep slope.
i already have the tumbling code. but i dont know how to detect the steep slope.

can someone give me some code or help me code this??


merry christmas!
HowDo
21
Years of Service
User Offline
Joined: 28th Nov 2002
Location: United Kingdom
Posted: 17th Dec 2009 16:02
there's a part in the character controller which you may have found that can set the angle which it will not go up or down a slope, now whether you can use that to make your tumble code run.

Dark Physics makes any hot drink go cold.
David iz cool
19
Years of Service
User Offline
Joined: 21st Sep 2005
Location: somewhere lol :P
Posted: 18th Dec 2009 17:12
that only controls preventing the cc from going up the slope. not down.
Orion1024
15
Years of Service
User Offline
Joined: 7th Mar 2009
Location: Dimensional Coordinates: 323.935.914.157
Posted: 20th Dec 2009 02:17
You could add two hidden limbs...one at the bottom of your player and one at the bottom but in front of your player, then raycast down from the front limb to the ground to get y position that intercepts the ground. Then use the distance from the front limb to the player limb and the distance from the ground intercept point to the player limb to calculate the angle.

Looking for the vortex to another Earth
David iz cool
19
Years of Service
User Offline
Joined: 21st Sep 2005
Location: somewhere lol :P
Posted: 20th Dec 2009 16:20
thanks! ill rem try that

i was really hoping someone would give me some raycast code. but oh well.

Login to post a reply

Server time is: 2024-11-24 15:09:19
Your offset time is: 2024-11-24 15:09:19