Playmaker Forum
PlayMaker Help & Tips => PlayMaker Help => Topic started by: spiralKing on March 20, 2014, 11:41:53 PM
-
Is it possible to get this in playMaker?
transform.right.y
and
transform.right.x
-
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!!!
-
I've got this line of code
baseAngle -= Mathf.Atan2(transform.right.y, transform.right.x) * Mathf.Rad2Deg;
and I'm just trying to understand what this part means
(transform.right.y, transform.right.x)
-
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