Playmaker Forum

PlayMaker Help & Tips => PlayMaker Help => Topic started by: Silicon Power on November 11, 2016, 12:57:27 AM

Title: Can I make my gamepad right sticker to act like a mouse? (I use InController)
Post by: Silicon Power on November 11, 2016, 12:57:27 AM
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.
Title: Re: Can I make my gamepad right sticker to act like a mouse? (I use InController)
Post by: jeanfabre on November 11, 2016, 03:22:44 AM
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
Title: Re: Can I make my gamepad right sticker to act like a mouse? (I use InController)
Post by: Silicon Power on November 11, 2016, 06:39:03 AM
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.
Title: Re: Can I make my gamepad right sticker to act like a mouse? (I use InController)
Post by: jeanfabre on November 14, 2016, 12:56:23 AM
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