Forum rules - please read before posting.

Menu Button Jump while in direct touch movement

edited February 2017 in Technical Q&A
Hello,

How can I allow the player to use the "Jump" button which is triggering the Jump axis.

It appears this is no problem when the player is not moving while on Direct / Touch input, however when player in motion it cannot jump.

2. What would be the most ideal way to ensure there's a jump allowance delay, before they can jump again?

AC 1.55c

Thanks,

KZ

Comments

  • There is no restriction so far as jumping when moving goes.  AC allows jumping whenever the character is grounded, which is checked for by a Physics.CheckCapsule call if using a Rigidbody, and the "isGrounded" property of a Character Controller.

    If you're having trouble jumping when walking/running, check that your animations aren't causing the character to raise up slightly, and that your Rigidbody and Capsule Collider have correct values.  You may find that replacing those two components with a Character Controller gives you better results.

    A jump allowance delay isn't currently possible, but I shall look into adding one for the next release.  It shall likely come via the use of Animation Events, so that you can dynamically alter it depending on your character's animation state.
  • Thanks Chris,

    Sorry I should have cleared #1 up a bit more.

    While in direct touch movement ( 1 finger on screen ), the menu button itself and the jump is not accessible with the 2nd finger ( ex jump ),

    Buttons seem to be accessible only when 1 finger touch not while 1 is doing other actions and the 2nd one trying to use a button.
  • AC's Menu system does not allow for multiple touches at once - is your Menu's Source set to Adventure Creator?

    You may be able to get around this by switching to Unity UI, which I believe does support this.  An AC Menu can be easily converted to Unity UI by linking each AC element to a UI element - see this tutorial.
  • edited February 2017
    I'm using the default unity UI menu that comes with AC - similarly by following the tutorial I

    Duplicated the menu button made it into a jump and set to trigger the jump, (this works with 1 touch on screen no problems)

    It is linked as a prefab in AC as per tutorial, unsure why it doesn't register the 2nd touch as a valid menu selection?
  • Can you confirm that multi-touch input is working on a non-AC driven UI canvas?  At this point, it's not clear where the issue lies.

    If need be, you could separate your UI from AC and simply call AC's script commands from it - but let's make sure multi-touch is working on a normal UI first.
  • Alright so here's what I figured.

    Having UI canvas with a button / or multiple, whIle in direct touch play make I can utilize the button,

    Then I noticed I could also utilize the UI AC button as well (jump),

    The only difference that I see is I've got the EventSystem in my hierarchy while building as from before I did not, somehow thats not instantiated by AC or am I supposed to have it in my scene to begin with?
  • AC will create one if none exists, as its necessary for UI-driven AC Menus to work.  This will be a standard EventSystem component, with no options changed from their default values.

    If you want AC to spawn a custom EventSystem, create a new EventSystem prefab and assign it at the top of the Menu Manager.
  • okay, so im confused why does it work by making it a prefab and not without leaving it blank there?
  • edited February 2017
    When left blank, AC will create a "generic" EventSystem with no idea of what settings you want set - it'll just be a standard EventSystem with the most basic of settings.  When setting a prefab, you can tailor it to your own needs.
  • I don't change any settings on the prefab one either, the moment I created a button I selected the defaulted EvenSystem and made it a prefab.

    It's no big deal since it works that way, I'm just saying everything is default and no custom settings, should work with AC's standard one.
  • I'll look into it...
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.