Playmaker Forum
PlayMaker Help & Tips => PlayMaker Help => Topic started 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.
-
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
-
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.
-
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