playMaker

Author Topic: [SOLVED] How to "Get and Set Rotation"?  (Read 1217 times)

DrBlender

  • Playmaker Newbie
  • *
  • Posts: 2
[SOLVED] How to "Get and Set Rotation"?
« on: September 19, 2018, 03:14:58 PM »
Hey,

i have a little problem, i hope someone can help me =)

how can i get a rotation from gameobject1 to gameobject2? i tried with Quaternion Look Rotation but it doesnt work very well
« Last Edit: September 20, 2018, 11:27:09 AM by DrBlender »

djaydino

  • Administrator
  • Hero Member
  • *****
  • Posts: 7615
    • jinxtergames
Re: How to "Get and Set Rotation"?
« Reply #1 on: September 20, 2018, 05:43:37 AM »
Hi.
Do you have both set to 'world' or 'self'?

nFighter

  • Beta Group
  • Full Member
  • *
  • Posts: 174
    • multiplayer adult fighting
Re: How to "Get and Set Rotation"?
« Reply #2 on: September 20, 2018, 05:46:17 AM »
Didn't you just use Get Rotation and Set Rotation actions for that?
indie developer of multiplayer adult fighting
http://nakedfighter3d.com

DrBlender

  • Playmaker Newbie
  • *
  • Posts: 2
Re: How to "Get and Set Rotation"?
« Reply #3 on: September 20, 2018, 11:26:45 AM »
Okay, never mind, yesterday i didnĀ“t see get and set rotation... but thanks for your help!

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: How to "Get and Set Rotation"?
« Reply #4 on: September 21, 2018, 01:53:28 AM »
Hi,

 you need to use QuaternionInverse and GetQuaternionMultipliedByQuaternion action for this.

https://answers.unity.com/questions/1137604/finding-the-rotation-of-a-game-object-in-relation.html

I did a dedicated action for this so that it's easier to get. It's on the ecosystem:

GetRelativeRotation

Bye,

 Jean