playMaker

Author Topic: Motion Controller Help  (Read 1476 times)

Andys

  • Playmaker Newbie
  • *
  • Posts: 30
    • View Profile
Motion Controller Help
« on: April 07, 2013, 11:38:03 AM »
Im using the get axis vector to move a tank about, but this gets inputs from the arrow keys on my keyboard from project settings > inputs.

I have the ios PM part setup  to send via touch gui event, same setup as the tutorial, but have no idea how to send this event to either the horizontal or vertical part of the control.

I can send the event for the fire button as this is a separate PM part Ive created and can control be sending a global event.

can someone point me in the right direction


jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 12351
  • Official Playmaker Support
    • View Profile
Re: Motion Controller Help
« Reply #1 on: April 09, 2013, 12:23:49 AM »
Hi,

 the problem is that Unity Input can not be overriden, so you will have to roll your own input manager if you expect both the keyboard and the touch screen to control an object.

 what controller are you using right now to move the tank about?

bye,

 Jean

Andys

  • Playmaker Newbie
  • *
  • Posts: 30
    • View Profile
Re: Motion Controller Help
« Reply #2 on: April 09, 2013, 12:34:58 AM »
Hi Jean,
Im currently playing with the unity mobile JS controller, but it does not do what i want, I can move the tank about on the left joystick, but i want to move the turret and gun on the right joystick and have the right joystick be used as a fire button. Without being a coder, which i am not, seems it cant be done with PM.

Andys

  • Playmaker Newbie
  • *
  • Posts: 30
    • View Profile
Re: Motion Controller Help
« Reply #3 on: April 09, 2013, 01:34:11 PM »
Quick update, have the joystick working as i wanted it, and using the values I use with the keyboard.

I purchased the virtual control suite as it has PM actions included, which Ive used to make this work.

1st add the "VCAnalog Joystick PlayMaker Updater" script to the joystick, and add this to Get Property, store the Vector 3 as x,y,z, Ive multiplied the Vector 3 by 10 to match the speed used when using the keyboard.

Then used these Vector 3 values for the tank forward, backward and rotation, which was rotating two fast so divided this by 10 to slow it down.

Ive done the same for the turret, just need to sort out the fire button, but pleased with progress.

Andy