playMaker

Author Topic: Quaternion Look Rotation: Please Fix  (Read 1711 times)

sebaslive

  • Hero Member
  • *****
  • Posts: 572
    • Frame Tale Studios
Quaternion Look Rotation: Please Fix
« on: August 25, 2016, 04:12:41 PM »
The .isNone is on the wrong one in the quaternion script.

Code: [Select]
if (upVector.IsNone)
{
               
result.Value = Quaternion.LookRotation(direction.Value,upVector.Value);
}else{
result.Value = Quaternion.LookRotation(direction.Value );
}

Currently its like this but it should be reversed, I had to make a new Quaternion script to fix this but it would be much better if this was working in the official release as to not have to rely on having to fix it every time on import.

Thanks!
All my VR games use Steam VR Playmaker Toolkit: http://u3d.as/u20
And Oculus Touch Playmaker Toolkit: http://u3d.as/QT5


Follow me @sebasRez

Alex Chouls

  • Administrator
  • Hero Member
  • *****
  • Posts: 4000
  • Official Playmaker Support
    • LinkedIn
Re: Quaternion Look Rotation: Please Fix
« Reply #1 on: August 26, 2016, 12:23:09 PM »
Thanks for the report - I'll make sure this gets into the next update!

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: Quaternion Look Rotation: Please Fix
« Reply #2 on: August 29, 2016, 07:05:53 AM »
hi,

 It's funny, cause I spotted that around the same time and I already pushed a fix, so this will make it into the next version.

 Right now, my fix is to force the up vector and then it works, else, making a reproducation of existing code will cause issue at start.

Bye,

 Jean