Forum rules - please read before posting.

Changing cursor speed at runtime (using Controller)

edited October 2019 in Technical Q&A

Hi,

I'm wondering if it's possible to change the Sensitivity of the cursor at runtime. I'm currently playing around with a controller input, and I've set the Joystick to control the cursor in the game. In Unity InputManager, I can set the Sensitivity for the joystick which controls how fast the cursor is moving in the game.

I would like to be able to change this setting at runitme, but I can't figure out if it's more on the Unity side or Adventure Creator's. I've read that a good practice is to create a GameObject that is essentially a fake cursor, and that way I could affect it's speed a lot easier, but I'm not sure if AC is doing something like this already. If so, how would I go about changing the speed of the cursor during gameplay?

Unity: 2018.2.18f1
AC: 1.68.4

Comments

  • If the AC cursor is simulated (i.e. moved with a controller, not the mouse), then you can vary it's speed with the PlayerInput component's Cursor Move Speed value. This can be found in the Inspector of the GameEngine GameObject.

    Through script, you can modify this at runtime with:

    AC.KickStarter.playerInput.cursorMoveSpeed
    
  • Ahh, so simple! Exactly what I was looking for. I guess I just didn't realise there's cursor options in the PlayrInput in GameEngine object!

    Thank you!

Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Welcome to the official forum for Adventure Creator.