Playmaker Forum

PlayMaker Help & Tips => PlayMaker Help => Topic started by: 3D Lunatic on November 04, 2019, 04:11:57 AM

Title: Convert 2D rotation into Vector2 [SOLVED]
Post by: 3D Lunatic on November 04, 2019, 04:11:57 AM
I'm making a 2D pinball game. I need to convert an object's rotation into a Vector2 variable. The rotation will only be around the Z axis, as it's a 2D game. Is there an action which will do this for me?

Thanks!
Title: Re: Convert 2D rotation into Vector2
Post by: jeanfabre on November 05, 2019, 02:01:46 AM
Hi,

 yes, use TransformDirection action.

use the x axis as the pointing vector that defines your direction ( against the rotating z axis).

this will give you its current direction in world space.

then you can extract the direction values and put it in a vector2 if you want.

Bye,

 Jean