playMaker

Author Topic: Can I make my gamepad right sticker to act like a mouse? (I use InController)  (Read 1750 times)

Silicon Power

  • Full Member
  • ***
  • Posts: 186
Hey guys, I need to make my gamepad right sticker to act like a mouse movements, is that possible? also I'm using InController asset too.
« Last Edit: November 11, 2016, 01:21:37 AM by Silicon Power »

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Hi,

you can't fake mouse movement, in the sense that if you read the mouse position, that's it, there is no other way.

 
the best way is to compose mouse movemement and custom inputs, then if the user has a mouse it works, if the user has a joysticks it works.

this is how you do it as well if you want to support mouse and touch, the best way is to accept both inputs.

Bye,

 Jean

Silicon Power

  • Full Member
  • ***
  • Posts: 186
Hi,

you can't fake mouse movement, in the sense that if you read the mouse position, that's it, there is no other way.

 
the best way is to compose mouse movemement and custom inputs, then if the user has a mouse it works, if the user has a joysticks it works.

this is how you do it as well if you want to support mouse and touch, the best way is to accept both inputs.

Bye,

 Jean

Thanks for help, but how can I read mouse position? and then change it position with right sticker.

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Hi,

 yes, save the mouse position into a vector variable and then add the sticker position to it.

 BUT you won't be moving the cursor... you understand that right?

for this ( not tested myself), you'll need an asset like:

https://www.assetstore.unity3d.com/en/#!/content/17177

and you'll need to create custom actions for it. Maybe the author would be willing to provide support. Else let me know, I'll put it on my todo :)

Bye,

 Jean