playMaker

Author Topic: How do I get this in playMaker?[SOLVED]  (Read 2012 times)

spiralKing

  • Junior Playmaker
  • **
  • Posts: 50
How do I get this in playMaker?[SOLVED]
« 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
« Last Edit: April 10, 2014, 12:48:22 PM by spiralKing »

Bjakuja

  • Junior Playmaker
  • **
  • Posts: 75
Re: How do I get this in playMaker?
« Reply #1 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!!!

spiralKing

  • Junior Playmaker
  • **
  • Posts: 50
Re: How do I get this in playMaker?
« Reply #2 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)

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: How do I get this in playMaker?
« Reply #3 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