Forum rules - please read before posting.

Unable to make the player jump in a 2D game

edited August 2017 in Technical Q&A
Hi

My player game object has a rigidbody 2D component, but when I press space to jump, it still gives me an error - "Player cannot jump without a Rigidbody component"

I searched a lot for a solution to this issue but no one else seems to be having this problem. I'm using direct method, and no other asset that controls movement.

I have not given my player any animations yet as I want to get to that later on. I've also not kept an animator component as of now, and have set the animation engine to sprites unity temporarily. I would think none of this should be causing this issue?

(Edit: The AC manual says, under the direct movement method, that jump is only valid for 3D characters. Is jumping for 2D characters not available?)

Here are some screenshots of the player inspector and of the input manager
Thanks!

image


Comments

  • edited August 2017
    Unfortunately, jumping is not available for 2D characters.  It causes problems with other systems such as pathfinding.

    You can of course write a custom motion controller - see the Manual - but I'm afraid, as it says, you can't do it with AC vanilla.
  • @chrisicebox Thanks for the response Chris. I originally had no plans for a jumping mechanic in my game, but wanted to try it out in case it made traversal more fun. 
    Guess I'll see if my game really needs it or not and accordingly look into custom motion controllers.
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.