Playmaker Forum

PlayMaker Help & Tips => PlayMaker Help => Topic started by: spiralKing on March 20, 2014, 11:41:53 PM

Title: How do I get this in playMaker?[SOLVED]
Post by: spiralKing on March 20, 2014, 11:41:53 PM
Is it possible to get this in playMaker?
Code: [Select]
transform.right.y
and
transform.right.x
Title: Re: How do I get this in playMaker?
Post by: Bjakuja on March 21, 2014, 09:41:23 AM
What do you mean exactly using transform class?
Do you mean this:

public speed = 5;
transform.Translate (0, 0, 5 * Tim.deltaTime)
which will move GameObject in z direction by 5 per second, or
transform.Rotate ()...... or
rigidbody.velocity = transform.right * 10;

I suppose you want to use transform.Translate and to move your GameObject on x and y axis, in that case you just use Translate action and you will get that.

Cheers!!!
Title: Re: How do I get this in playMaker?
Post by: spiralKing on March 22, 2014, 06:57:33 PM
I've got this line of code
Code: [Select]
baseAngle -= Mathf.Atan2(transform.right.y, transform.right.x) * Mathf.Rad2Deg;
and I'm just trying to understand what this part means
Code: [Select]
(transform.right.y, transform.right.x)
Title: Re: How do I get this in playMaker?
Post by: jeanfabre on April 08, 2014, 08:08:02 AM
Hi,

 yes, use the action "transform Direction" and defines the vector ( in local space) and you'll get the "right" value, which is as a vector3(1,0,0).

https://docs.unity3d.com/Documentation/ScriptReference/Vector3.html

Bye,

 Jean