Playmaker Forum
PlayMaker Help & Tips => PlayMaker Help => Topic started by: markfrancombe on January 15, 2016, 02:54:50 AM
-
Sure this is simple, just can't figure it out, but how do I get input from my the scrollwheel (for zooming camera in and out of 3rd person view)
I get how to connect it to my player controller value, but literally, I canĀ“t find and action that explicitly mentions the scroll wheel. Is there some input action, or mouse action I need to install?
-
Hi,
it's simply because the scrollwheel is handled like any other Unity input, via the Unity Input settings.
there is in there a pre built input called "Mouse ScrollWheel"
so use the regular input actions such as "get Axis" pointing to that "Mouse ScrollWheel" input reference and you are good to go.
Bye,
Jean
-
Thanks Jean, that worked a charm... new issue however is that after scrolling the value changes on the camera y value (accessed by dragging the component into PlayMaker, selecting Set Property, and linking my Get axis Mouse scroll wheel var to it) however, the value jumps back to the default afterwards... wo although it does zoom a bit, it pops straight back to the normal position.. (and is a tad jerky, no doubt due to the same issue).
-
Hi,
Inputs do not adds up, so if you are using the scrollwheel for translating, make sure you increment instead of using the absolute value.
value = value + mousewheel
instead of value = mousewheel
Bye,
Jean
-
Yeah... of course.. geddit... Thanks
-
Arghhh.. Sorry Jean, I thought I could figure out how to do this...
I know I have to do something like:
Get Axis >store that as MouseScroll
Multiply the axis by a value>store that
Use that to move the camera translation
and Store the result BACK to MouseScroll
but I cant find the right combination of actions or variables...
right now Im just stacking them in a row, do I need to transition them or something?
M
-
Hi,
Have you been able to figure this out?
Bye,
Jean
-
Hello,
It's been a long time for this issue but I Wanted to tell Icould use the MouseWheel axis very easily to set the Y component of camera and zoom according to that. I used the GetAxis to get the mousewheel float and then translate the camera on the Y axis according to that float.