Playmaker Forum

PlayMaker Help & Tips => PlayMaker Help => Topic started by: IIKII on September 17, 2019, 05:31:46 AM

Title: Getting surface angle
Post by: IIKII on September 17, 2019, 05:31:46 AM
Hi, i am trying to get a angle between a floor and the player to see if the player is on a slope. So if the angle is bigger than 30, the animation and speed will change.

How do i achieve that?
Title: Re: Getting surface angle
Post by: djaydino on September 17, 2019, 07:57:42 AM
Hi.
I looked on unity forums and found this :

https://answers.unity.com/questions/50774/checking-slope-angle-the-object-is-standing-on.html

So i made a action (attachment below) based on this answer, but i did not test it tho.
Let me know if it works.

To use you need to get the contact normal (with Get Colission Info action)
and use in the action.
also select the up direction from the normal.

Title: Re: Getting surface angle
Post by: IIKII on September 17, 2019, 11:22:04 PM
Yeah i think it works but i am using raycast.

Thanks for the action :)