playMaker

Author Topic: foot IK rotation  (Read 1285 times)

bcottman

  • Playmaker Newbie
  • *
  • Posts: 8
foot IK rotation
« 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

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: foot IK rotation
« Reply #1 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