playMaker

Author Topic: Create a new variable out of subtracting two variables  (Read 1228 times)

darthvader247

  • Playmaker Newbie
  • *
  • Posts: 1
Create a new variable out of subtracting two variables
« on: March 30, 2017, 08:20:51 AM »
Hi all,

I am somewhat new to Unity on and off for the past couple of years. I recently purchased Play Maker, it is really cool! Super powerful! Unforuantely I am a little stuck. When I try to move (on x and y axis) an object by touching it does BUT not very well. I am assuming that is because I need a variable like: dragX = mouseX – objx. However I do not know how to put two variable into one. Can anyone help? It would be greatly appreciated 😊

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: Create a new variable out of subtracting two variables
« Reply #1 on: March 31, 2017, 01:59:36 AM »
Hi,

 use the "float operator" action, this will allow you to do that indeed.

if you want to perform operations inside a Vector3, then it's best to extract the x component into an FsmFloat, work on it and then inject it back into the FsmVector3.

 Bye,

 Jean