playMaker

Author Topic: Get Vector3 information from a gameobject  (Read 4010 times)

OhYeahItsJosh

  • Playmaker Newbie
  • *
  • Posts: 3
Get Vector3 information from a gameobject
« on: November 29, 2015, 03:29:25 PM »
Howdy!  I'm new to Playmaker and I thought I'd give it a shot because frankly, I'm garbage when it comes to programming.  I'm trying to set up my first FSM but I'm having trouble with it. 

I'm making a game where the player grows like Ant-Man.  Right now, I'm making a tutorial for it but I'm having trouble getting this to work.  I want to make a FSM that pulls the Vector3 information from my player and compares it to a pre-determined value.  If the player reaches that pre-determined value then it pulls up a GUI that says completes the quest.

However, I can't seem to get it to read the vector3 information from the player.  How do I do this?  Keep in mind that I'm a newbie to Playmaker.  Thanks!

Justin

  • Junior Playmaker
  • **
  • Posts: 58
Re: Get Vector3 information from a gameobject
« Reply #1 on: November 29, 2015, 05:32:33 PM »
Try the get position action in the fsm event on your player.

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: Get Vector3 information from a gameobject
« Reply #2 on: December 01, 2015, 01:26:25 AM »
Hi,

 I am not sure if you want to access a Vector3 variable or like Justin said the position, rotation or scale of you player?

 if you want to access a variable, use "get Fsm xxx" action and you point to the player, and you will be able to get any fsm variables this way. If you want to get the position for example, use "get position" and target the player. both actions will work from an fsm that is not on your player.


 Bye,

 Jean

OhYeahItsJosh

  • Playmaker Newbie
  • *
  • Posts: 3
Re: Get Vector3 information from a gameobject
« Reply #3 on: December 01, 2015, 02:18:55 PM »
I'm looking to access the position and scale of the player.  The C# version of what I'm looking for would be player.transform.local.y

Now I kinda feel like a dummy because I think get position is exactly what I needed. lol.  Thanks Jean!

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: Get Vector3 information from a gameobject
« Reply #4 on: December 02, 2015, 01:01:15 AM »
Hi,

 Yep, try with the GetPosition action :)

 Bye,

 Jean