playMaker

Author Topic: Manipulating transform.forward and transform.localScale  (Read 2511 times)

cdutoit

  • Playmaker Newbie
  • *
  • Posts: 30
Manipulating transform.forward and transform.localScale
« on: February 06, 2015, 07:44:40 AM »
Hello - I can't find the actions to manipulate the transform.

1.  I want to move a GameObject within a FSM. This is the C# code:

Code: [Select]
transform.position += transform.forward * speed * Time.deltaTime;   
I can get the Transform using the GetTransform action and put it into a UnityEngine.Transform, but how do I access the transform.forward property? Put another way, what's the best way of accomplishing that line in Playmaker?

2. Similar to above, how do I access the localScale to shrink the object slowly over time, corresponding to this C# code:

Code: [Select]
transform.localScale -= new Vector3(0.5f, 0.5f, 0.5f) * Time.deltaTime;
I can't find any method/action to retrieve or set that property of the transform.

Thanks for any help!