playMaker

Author Topic: How to store Vector3 of gameObject into variable?  (Read 1103 times)

Onva

  • Playmaker Newbie
  • *
  • Posts: 1
How to store Vector3 of gameObject into variable?
« on: December 11, 2017, 07:26:20 PM »
I want to store the Vector3 of a gameObject in a variable, in this case, a respawn point, and set the position of my fps controller to that variable. I know that I should use the Get and Set position actions, but I'm not sure how they work. How would I go about doing this?

djaydino

  • Administrator
  • Hero Member
  • *****
  • Posts: 7616
    • jinxtergames
Re: How to store Vector3 of gameObject into variable?
« Reply #1 on: December 12, 2017, 04:01:22 AM »
Hi.
It is best to get familiar 1st with playmaker.
you can find many tutorials here
You can find a lot in the User Tutorial Index

'Get position' will get the position of your selected gameobject.
make a vector3 variable and store the vector.

'Set position' will set the position of your selected gameobject.
use the stored vector