playMaker

Author Topic: Get Vector3 from Script  (Read 1522 times)

mthicke

  • Playmaker Newbie
  • *
  • Posts: 11
Get Vector3 from Script
« on: February 13, 2014, 11:51:25 PM »
I'm getting an error trying to get a vector3 from a script with this code:

theFsm.FsmVariables.GetFsmVector3("NextDestination").Value = pointsList.pop;

error:
BCE0022: Cannot convert 'function(): Object' to 'UnityEngine.Vector3'.

is this the right way to do this?

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: Get Vector3 from Script
« Reply #1 on: February 13, 2014, 11:54:12 PM »
Hi,

First save your pointList.pop into a explicitly declared Vector3 variable, likely you'll find that this is not a Vector3. Basically the error seems to indicate that pointsList doesn't containts Vector3.

Bye

 Jean