Playmaker Forum

PlayMaker Help & Tips => PlayMaker Help => Topic started by: wheretheidivides on December 17, 2014, 11:23:29 PM

Title: Is there a variable for position, rotation and scale?
Post by: wheretheidivides on December 17, 2014, 11:23:29 PM
Instead of using get position, get rotation and get scale of a game object, is there a variable to all at the same time?  If not, could there be?  Playmaker could just have 3 variables in one.  that way one could get the info from a game object and then set it.  This would avoid 3 variables per obkect.  We could call this a vector9.
Title: Re: Is there a variable for position, rotation and scale?
Post by: Lane on December 18, 2014, 09:48:12 AM
Internally it is the Transform. A Vector9 variable doesn't make sense when you consider the structure of Transform.

http://docs.unity3d.com/ScriptReference/Transform.html

There are a lot of things to consider when working with the transform of an object which is why the actions are subdivided in such a manner.

What is the use case? Just to apply a Vector3 to the Position, Rotation and Scale in a single action? If that is so, we can just make an action to do it.
Title: Re: Is there a variable for position, rotation and scale?
Post by: wheretheidivides on December 18, 2014, 05:25:09 PM
I'd like to see an action for that.  position, rotation and scale (transform9) and another with just position and rotation (transform6).  It'd speed things up.
Title: Re: Is there a variable for position, rotation and scale?
Post by: jeanfabre on December 22, 2014, 03:47:46 AM
Hi,

yeah, the problem would be ( on top of what Lane said), that then all Playmaker actions would need to understand this transform, and what you want from it, when you work with it, and so it make sense currently to keep every properties in its own vector3 variable.

 I agree, a convenient action to get all three ( or part of it) properties of a transform would speed things up a bit.

I'll see if I can do that action withint he next few days, please bump.

 Bye,

 Jean