Playmaker Forum

PlayMaker Feedback => Feature Requests => Topic started by: yuewah on August 01, 2012, 10:29:50 AM

Title: Why there is no Type "Transform" in State Machine Variables ?
Post by: yuewah on August 01, 2012, 10:29:50 AM
Why there is no Type "Transform" in State Machine Variables ?
Title: Re: Why there is no Type "Transform" in State Machine Variables ?
Post by: Red on August 01, 2012, 03:43:24 PM
not sure i fully understand what you're aiming for... do you mean the vector3 variable (which will store x, y and z coordinates) which can be used to transform an object's position or more a thing to handle rotation (using a vector3 variable for the rotational offsets?)

or both?
Title: Re: Why there is no Type "Transform" in State Machine Variables ?
Post by: yuewah on August 01, 2012, 10:25:46 PM
No, the unity class called Transform that contains both position, rotation and scale.
Title: Re: Why there is no Type "Transform" in State Machine Variables ?
Post by: PIXELCRY on January 02, 2013, 10:34:51 AM
Hi sorry for upping this topic, i actually have same problem:

my script have this variable "   public Transform target;" from the inspector i can assign directly a gameobject
but when i try to use action "set property" on "target" i cant find a matching variable that can be used :(
Title: Re: Why there is no Type "Transform" in State Machine Variables ?
Post by: kiriri on January 02, 2013, 11:35:07 AM
when scripting you're always using the namespace UnityEngine. Go figure in which category the Transform is :P
(Tipp: in the object type selection first go to unityEngine and then select Transform from the long list that should appear.)
Title: Re: Why there is no Type "Transform" in State Machine Variables ?
Post by: jeanfabre on January 02, 2013, 02:46:13 PM
Hi,

 Yes FsmTransform is very much missing for me too, as well as FsmEnum to reference existing enums from various scripts and apis...

and FsmAudio while I am at it :)

bye,

 Jean
Title: Re: Why there is no Type "Transform" in State Machine Variables ?
Post by: PIXELCRY on January 03, 2013, 09:23:18 AM
when scripting you're always using the namespace UnityEngine. Go figure in which category the Transform is :P
(Tipp: in the object type selection first go to unityEngine and then select Transform from the long list that should appear.)

I dont get your meaning, im using a NGUI script and i tried to change the variable from transform to gameobject, but i cant get it work.
Title: Re: Why there is no Type "Transform" in State Machine Variables ?
Post by: kiriri on January 03, 2013, 09:35:11 AM
I explained it on the mesh variable here:
http://hutonggames.com/playmakerforum/index.php?topic=2396.0

or alternatively I've got a one minute silent tut here :

It's the same principle for the transform. You can either use GetComponent and use an object variable of the type UnityEngine/Transform or you can use get Property on the gameObject with the transforms you want and save it to said UnityEngine/Transform variable.

This object variable will then be useable for the set Property action.
Title: Re: Why there is no Type "Transform" in State Machine Variables ?
Post by: PIXELCRY on January 03, 2013, 10:26:34 AM
oh awesome i didnt know it was possible! thank you

anyway i found an other way just create a new public game object variable and put it value in my transform variable

target = targetGO.transform;