Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 13 Next capture
2021 2022 2023
1 capture
13 Jun 22 - 13 Jun 22
sparklines
Close Help
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
  • Asset Store
  • Get Unity

UNITY ACCOUNT

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account
  • Blog
  • Forums
  • Answers
  • Evangelists
  • User Groups
  • Beta Program
  • Advisory Panel

Navigation

  • Home
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
    • Blog
    • Forums
    • Answers
    • Evangelists
    • User Groups
    • Beta Program
    • Advisory Panel

Unity account

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account

Language

  • Chinese
  • Spanish
  • Japanese
  • Korean
  • Portuguese
  • Ask a question
  • Spaces
    • Default
    • Help Room
    • META
    • Moderators
    • Topics
    • Questions
    • Users
    • Badges
  • Home /
avatar image
1
Question by Edwin F · Aug 05, 2014 at 12:12 AM · 2dgamegeometrydash

How would you make a jump like geometry dash/impossible game?

So I am trying to make a geometry dash/impossible game clone as my first unity game. I fixed the movement I believe, but the only problem I am having now is the jump.

I dont know how they get a perfect jump like that? It is like quick and goes up quick and down quick. How could you achieve such a thing?

Here is an example if you want to see how it works: http://impossiblegame.org/the-impossible-game/

If anyone could tell me how you could achieve this I would be very grateful.

Thanks.

Comment
Add comment · Show 2
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image robertbu · Aug 05, 2014 at 12:18 AM 0
Share

How you solve this will depend on how you are moving your character (transform, character, Rigidbody). For example, if you are using the FPS Input Controller, you can just change the jump height and the gravity to get this. Or you can take a look at how gravity is implemented in the CharacterController.$$anonymous$$ove() reference page.

avatar image thornekey · Aug 05, 2014 at 12:48 AM 0
Share

a lot of damping D:

Also, with the impossible game, i dont think the character is actually rotating. I think that is just for effect. You could add an animation over your collider but really just be moving it up like a regular jump.

7 Replies

· Add your reply
  • Sort: 
avatar image
2

Answer by bengris32 · Sep 04, 2015 at 02:51 PM

@Edwin F

You can use the code i messed with from the coding API

 using UnityEngine;
 using System.Collections;
 
 public class Move : MonoBehaviour {
     public float speed = 6.0F;
     public float jumpSpeed = 8.0F;
     public float gravity = 20.0F;
     private Vector3 moveDirection = Vector3.zero;
     void Update() {
         CharacterController controller = GetComponent<CharacterController>();
         if (controller.isGrounded) {
             moveDirection = new Vector3(1, 0, 0);
             moveDirection = transform.TransformDirection(moveDirection);
             moveDirection *= speed;
             if (Input.GetButton("Jump"))
                 moveDirection.y = jumpSpeed;
             
         }
         moveDirection.y -= gravity * Time.deltaTime;
         controller.Move(moveDirection * Time.deltaTime);
     }
 }

Hope This Helps!!

Comment
Add comment · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image
0

Answer by Light997 · Sep 04, 2015 at 01:58 PM

I would try to catapult the cube into the air with the transform.y and then slam it back down again when it hits a certain height or time. You could also just twiddle with the numbers on the Character Controller Script.

But always remember: There is never just one way to solve any programming challenge. There are possibly even better ways out there, but the more control you want to have over your jump and the more you want to fine-tune it, the more complex the code gets. Be careful not to get caught up, but don't just put the problem aside either, because jumping is the base mechanic of The Impossible Game. If your base mechanic sucks, the whole game will suffer tremendously.

I've seen quite a few puzzle games that depended entirely on how skillful you could work the mechanics fall completly flat because the mechanics were random or just entirely unmanageable. If you have a skill-based game in which one of the mechanics doesn't work or feel right, chuck it. Don't be like other developers who then release it for $4.99 and tell everyone who can't do it that they're just too bad at the game.

Went off on a tangent a little there. Hope I could help :)

Comment
Add comment · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image
0

Answer by darksouls3fans · Jun 18, 2016 at 05:46 AM

Well this article that i've been waited for so long. I need this article to complete my assignment in the college, and it has same topic with your article. Thanks, great share. dark souls 3 emoji

Comment
Add comment · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image
0

Answer by PointyPigheadGames · May 26, 2017 at 01:10 PM

https://www.youtube.com/watch?v=wHXpsFQhtGQ&feature=youtu.be

I have made a tutorial here on how to do this.

Comment
Add comment · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image
0

Answer by linda254 · Jul 21, 2017 at 07:53 AM

Been searching for this for some time now. Great read. bestbuy

Comment
Add comment · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
  • 1
  • 2
  • ›

Your answer

Hint: You can notify a user about this post by typing @username

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this Question

Answers Answers and Comments

10 People are following this question.

avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

How do I make a dash attack while doing a top down 2d game 1 Answer

How do i dash in a direction an arrow is showing? 1 Answer

Player movement boudaries in 2D 1 Answer

2d Lighting - Weird light triangles 0 Answers

what is the best way to do this game? 2 Answers


Enterprise
Social Q&A

Social
Subscribe on YouTube social-youtube Follow on LinkedIn social-linkedin Follow on Twitter social-twitter Follow on Facebook social-facebook Follow on Instagram social-instagram

Footer

  • Purchase
    • Products
    • Subscription
    • Asset Store
    • Unity Gear
    • Resellers
  • Education
    • Students
    • Educators
    • Certification
    • Learn
    • Center of Excellence
  • Download
    • Unity
    • Beta Program
  • Unity Labs
    • Labs
    • Publications
  • Resources
    • Learn platform
    • Community
    • Documentation
    • Unity QA
    • FAQ
    • Services Status
    • Connect
  • About Unity
    • About Us
    • Blog
    • Events
    • Careers
    • Contact
    • Press
    • Partners
    • Affiliates
    • Security
Copyright © 2020 Unity Technologies
  • Legal
  • Privacy Policy
  • Cookies
  • Do Not Sell My Personal Information
  • Cookies Settings
"Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges