Forum rules - please read before posting.

Joystick and button

Hello!
How can I add touch joystick for character movement (instead of WSAD) and button (instead of Left Mouse button)?
Examples of games: ResidentEvil 1-3, Obscure.

Comments

  • Settings Manager - set the Movement method to Direct Control, and the Input Method to Keyboard Or Controller.  The list of required inputs below will update with those you need to set up in Unity's Input manager.
  • I meant virtual joystick and touch buttons (for Android). Is it possible?
  • just out of pure interest, is it possible to switch the input methods ingame? I would love to eventually add a switch (between point&click and tank controls) to the options menu... is there a way to do that?
  • Yes, though you'll have to build the UI yourself - either with the Menu Manager or some custom scripting.

    AC's Menu Button element allows you to simulate the pressing of any of the "Required inputs" as listed in the Settings Manager, so you could build a Menu that handles things like "InteractionA" etc quite easily.

    Axes might be more tricky, though, if you want to let the player fine tune their movement speed for example.  You'd have to build a separate UI and have a custom script that relays their state to AC's input system.  Fortunately, this is a simple matter of calling AC's SimulateInput function:

    e.g.
    AC.KickStarter.playerInput.SimulateInput (SimulateInputType.Axis, "Horizontal", 1.0f);
  • nice, thanks!
  • edited March 2015
    @deroesi: I think our replies were posted at the same time, and I didn't see yours.

    To switch Input Method mid-game, a custom Action can be used to swap out your Settings Manager (one with all your new input settings).  The manual's section 12.7 covers this in more detail, but you can set it with this code:

    AC.KickStarter.settingsManager = myNewSettingsManager;
  • hehe, weird... your answer seemed to match my question as well (if you have no big idea about unity like me :D )

    but, thanks! ;)


  • edited May 2015
    Hi!
    I successfully created touch joistick. But Touch (сlick) anywhere on the screen causes  InteractionA. Sometimes it makes it difficult to use my joystick (near hotspot).

    Touch Button (created with menu) doesn't work with InteractionA. ((

    I tried to change Input Method (Mouse and Keyboard--->Keyboard and Controller) and created own button. Joystick and button work well now! )) But...
    Menu, dialogs, inventory dont work! (on touch it)  :((
    PS: I use DirectControl+ PlayerVicinity
  • @LightPharm: Sorry, you're going to have to back up a bit.  I don't quite understand.

    If you are making a touch-screen game, then you should set your Input method to Touch Screen.

    Does the interaction issue occur when the joystick is not on screen?  I'm not clear if this is a separate issue.  Please be really clear when explaining the problem (screenshots would be greatly appreciated), and I will do my best to help.
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.