playMaker

Author Topic: Solved: How could I make joystick sensitivity?  (Read 1386 times)

autumnboy

  • Junior Playmaker
  • **
  • Posts: 73
Solved: How could I make joystick sensitivity?
« on: June 15, 2019, 01:53:24 AM »
Hi all,

I'm trying to figure out making real-time joystick sensitivity for left and right stick for the settings.

I've tried several things but none of them work. I've tried pulling out x and z values from the vector created by get axis. Multiplying them by a sensitivity value and then clamping the range between -1,1  but it doesn't work with less sensitivity or diagonal movement is maxed to 1.

Any ideas?

Cheers,
Josh
« Last Edit: June 15, 2019, 03:24:01 AM by autumnboy »

autumnboy

  • Junior Playmaker
  • **
  • Posts: 73
Re: How could I make joystick sensitivity?
« Reply #1 on: June 15, 2019, 03:23:49 AM »
Figured it out after researching further and stumbling across a few posts.
To Do this:

1.- Get Axis > Store Vector3 as New_AxisVector

 2.-Smooth Damp Vector3
 Current: Current_AxisVector
 Target: New_AxisVector
Speed: Is your sensitivity. Lower is extremely sensitive

3.-Feed Current_AxisVector into your movement. In my case is was Controller Move.

Thore

  • Sr. Member
  • ****
  • Posts: 480
Re: Solved: How could I make joystick sensitivity?
« Reply #2 on: June 15, 2019, 03:34:15 AM »
Maybe that useful: Unity has two methods, Get Axis and Get Axis Raw. The standard is smooth “analogue” between -1 and +1, the raw version is returning either -1 or +1 (not analogue).

See here:
https://hutonggames.com/playmakerforum/index.php?topic=19333.msg85026#msg85026

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: Solved: How could I make joystick sensitivity?
« Reply #3 on: June 17, 2019, 04:37:49 AM »
Hi,

 As mentionned by Thore, GetAxisRaw would be a good start.

But maybe what you are looking for is not "sensitivity" but "Speed" ? in which case, you have this built in the GetAxisAction, where you can multiple the input with a multiplier factor, this is usually what you want for realtime adjustments.

Bye,

 Jean


 Bye,

 Jean