Playmaker Forum

PlayMaker Help & Tips => PlayMaker Help => Topic started by: DrBlender on September 19, 2018, 03:14:58 PM

Title: [SOLVED] How to "Get and Set Rotation"?
Post by: DrBlender 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
Title: Re: How to "Get and Set Rotation"?
Post by: djaydino on September 20, 2018, 05:43:37 AM
Hi.
Do you have both set to 'world' or 'self'?
Title: Re: How to "Get and Set Rotation"?
Post by: nFighter on September 20, 2018, 05:46:17 AM
Didn't you just use Get Rotation and Set Rotation actions for that?
Title: Re: How to "Get and Set Rotation"?
Post by: DrBlender 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!
Title: Re: How to "Get and Set Rotation"?
Post by: jeanfabre 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