playMaker

Author Topic: Move to Mouse  (Read 3141 times)

YuukiRus

  • Playmaker Newbie
  • *
  • Posts: 4
Move to Mouse
« on: September 30, 2013, 11:57:07 PM »
Currently I'm trying to create a game for android.
At the moment I'm stuck on trying to make a object constantly move to where the players finger is on the screen. Or mouse is on the screen.
This should NOT be linked to tapping or clicking. I want the object to just constantly move to the location of your finger or mouse at a set speed

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: Move to Mouse
« Reply #1 on: October 01, 2013, 03:13:56 AM »
Hi,

 have you experimented with the action "Move towards", it seesm the right way to go.

bye,

 Jean

YuukiRus

  • Playmaker Newbie
  • *
  • Posts: 4
Re: Move to Mouse
« Reply #2 on: October 01, 2013, 03:26:22 AM »
I have looked into the action though I'm unsure of how to use mouse or finger location with this as it asks for an objects locations or a var of a format I'm unaware of or how to save

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: Move to Mouse
« Reply #3 on: October 01, 2013, 03:35:38 AM »
Hi,

 Study this post:

http://hutonggames.com/playmakerforum/index.php?topic=272.msg1087#msg1087

 it works for mouse but also for touch, simply inject the touch position instead of the mouse position.

bye,

 Jean

YuukiRus

  • Playmaker Newbie
  • *
  • Posts: 4
Re: Move to Mouse
« Reply #4 on: October 01, 2013, 03:43:15 AM »
Thank you very much

YuukiRus

  • Playmaker Newbie
  • *
  • Posts: 4
Re: Move to Mouse
« Reply #5 on: October 01, 2013, 05:06:11 AM »
I added this into my fsm.
I have This activating first then move to in the same fsm on the piece I want to move.
But regardless of which field i fill with  the mousepoint variable (in the Mouse3ddrag action) Nothing happens. It doesn't even update the variable with any of these x.x

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: Move to Mouse
« Reply #6 on: October 03, 2013, 02:44:00 AM »
Hi,

 Is the example working? If it is, then it's likely something in your setup. you need to implement it step by step.

Can you make screenshots of how you have Mouse3ddrag set up?

Bye,

 Jean