Playmaker Forum

PlayMaker Help & Tips => PlayMaker Help => Topic started by: Phuzz on February 10, 2016, 09:13:11 AM

Title: Cannot convert fsmvector3 unityengine vector3 [SOLVED]
Post by: Phuzz 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
Title: Re: Cannot convert fsmvector3 unityengine vector3
Post by: mdotstrange 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
Title: Re: Cannot convert fsmvector3 unityengine vector3
Post by: Phuzz on February 10, 2016, 01:20:08 PM
Thank you :) Works like a charm.
Title: Re: Cannot convert fsmvector3 unityengine vector3 [SOLVED]
Post by: mrphilipjoel 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.