Playmaker Forum
PlayMaker Help & Tips => PlayMaker Help => Topic started by: nFighter on July 29, 2018, 08:51:35 PM
-
Hey, guys! Small question. There is an action Get Transform, but there is nothing like Set Transform... What's is this action about, how should I use it?
-
Hi,
you can't assign a Transform Component, it's alwasy here by default when you create a GameObject.
Do you actually mean copy the position, rotation and scale from one Transform to the other?
Bye,
Jean
-
Yes, I thought it's an action for copying the transforms all together...
(for now i'm using separated get&set position, rotation, scale)
-
Hi,
nop, and you are right, the best way is to use the get&set position, rotation, scale actions.
getting and setting a component is usually not recommanded because it's very bad for perfs, and here on top of that, you bumped into the one exception in Unity where a Transform is a special Component of a GameObject, it's unfortunate, because it would be great to have a gameobject without transform when they deal only with logic and not actual render or taking part of the physics.
Bye,
Jean