How to jump in a 2D world?

I have setup my game in 2D. I have created an isometric view with graphics.

The hero can walk left, right, north and south. I move it using translate.

I wanted the character to jump in those directions too. I was planning to use add force but realized that there is no ground plane.

For example when the character facing north when I press space-bar he should travel (jump) to a position above the current position.

Can anyone suggest how I can make the character jump in those directions?

Maybe create a float variable called zPos, and then manually add gravity and the jump force to it

if you have another variable called zVel you can set that to maybe 2 when you want to jump, and then on every FixedUpdate() you subtract it by the gravity. but make sure that you limit the Zpos to where the player currently is in the tilemap

void Jump(){
		zVel = 2;
	}

	void FixedUpdate(){
		zVel -= 1;
		if (zPos > minZPos) {
			zPos += zVel;	
		}
	}

this code is not tested, and probably wont work. It is just an example of what i was talking about, and might help you get the idea :slight_smile: