playMaker

Author Topic: Cannot convert fsmvector3 unityengine vector3 [SOLVED]  (Read 2588 times)

Phuzz

  • Full Member
  • ***
  • Posts: 101
    • Bzilla Games
Cannot convert fsmvector3 unityengine vector3 [SOLVED]
« on: February 10, 2016, 09:13:11 AM »
Hello,

I am trying to apply the following line to a custom action im working on:

TileID.Value = (tilename.GetTileIdAtPosition (Position, LayerNumber));

ofcorse im using the variables:

FSMVector3 Position
FSMInt LayerNumber

I am getting an error cannot convert FSM.Vector3 to UnityEngine.Vector3

I am not a coder, just trying to copy actions and modify them, and so far has been working but i stuck at this one. any help? Thank you

I am using tk2dTilemap Class
« Last Edit: February 11, 2016, 02:50:46 AM by Phuzz »
Bzilla Games "Education with a Tickle!"
Qbucket Games "Voxel Games"

mdotstrange

  • Hero Member
  • *****
  • Posts: 555
    • Can't code? Who cares! Make games anyway!
Re: Cannot convert fsmvector3 unityengine vector3
« Reply #1 on: February 10, 2016, 09:54:35 AM »
Try adding .Value after your Playmaker variables and it should get rid of that error like Position.Value and LayerNumber.Value
Indie game dev and instructor at the Strange School. Learn Playmaker at the Strange School!

Phuzz

  • Full Member
  • ***
  • Posts: 101
    • Bzilla Games
Re: Cannot convert fsmvector3 unityengine vector3
« Reply #2 on: February 10, 2016, 01:20:08 PM »
Thank you :) Works like a charm.
Bzilla Games "Education with a Tickle!"
Qbucket Games "Voxel Games"

mrphilipjoel

  • Playmaker Newbie
  • *
  • Posts: 48
Re: Cannot convert fsmvector3 unityengine vector3 [SOLVED]
« Reply #3 on: December 10, 2019, 10:34:48 AM »
Hello. 2 Years later. I have a similar issue, but its not working for me.

I have three public FSMvector3. start,middle,end.

Later I want to use them to draw a curve.

Code: [Select]
Vector3 p0 = start;
Vector3 p1 = middle;
Vector3 p2 = end;

When I try this, I get the error that I can't convert FSMvector3 to UnityVector3.

I tried using the suggestion mentioned above, but I must be implementing it wrong, because it didn't work.

Edit: I tried again, and this time adding .Value after each variable worked. Must have just been a weird fluke.
« Last Edit: December 10, 2019, 11:50:48 AM by mrphilipjoel »