Playmaker Forum

PlayMaker Help & Tips => PlayMaker Help => Topic started by: bcottman on March 26, 2017, 09:15:25 PM

Title: foot IK rotation
Post by: bcottman on March 26, 2017, 09:15:25 PM
Hello,

I am setting up humanoid foot IK ground interaction based on a raycast hit and I am having trouble getting rotation to work.  any ideas on the best way to translate the ray hit normal into a forward facing rotation for the foot IK?

thanks
B
Title: Re: foot IK rotation
Post by: jeanfabre on April 10, 2017, 02:17:24 AM
Hi,

 you'll have to do vector cross operation using the camera point of view axis:

https://docs.unity3d.com/ScriptReference/Vector3.Cross.html

Bye,

 Jean