playMaker

Author Topic: Get Transform - action  (Read 1474 times)

nFighter

  • Beta Group
  • Full Member
  • *
  • Posts: 174
    • multiplayer adult fighting
Get Transform - action
« 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?
indie developer of multiplayer adult fighting
http://nakedfighter3d.com

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: Get Transform - action
« Reply #1 on: July 30, 2018, 06:02:42 AM »
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

nFighter

  • Beta Group
  • Full Member
  • *
  • Posts: 174
    • multiplayer adult fighting
Re: Get Transform - action
« Reply #2 on: July 30, 2018, 01:12:36 PM »
Yes, I thought it's an action for copying the transforms all together...
(for now i'm using separated get&set position, rotation, scale)
indie developer of multiplayer adult fighting
http://nakedfighter3d.com

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: Get Transform - action
« Reply #3 on: July 31, 2018, 03:46:18 AM »
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