Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 14 Next capture
2021 2022 2023
2 captures
12 Jun 22 - 14 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 /
  • Help Room /
avatar image
0
Question by paragraph7 · May 25, 2016 at 03:19 PM · 2dphysics2d-platformerphysics2d

Is it possible to make a fast reaction 2D jumping game with Unity's physics?

Heya,

I been working on a infinite running platformer game where the jumping mechanic is extremely tight, that is, certain chain jumps need to be executed at almost pixel precise moments and the whole jumping things needs to feel like people speed running Mario. For now I've worked with Rigidbodies and gravity and all the basic physic stuff, but as the game has progressed I've began to notice glitches here and there where the character would not jump though Debug.Log clearly states that a jump was registered in the correct boolean states. I'm not that good of a coder to code my own physics into the game right off the bat so I figured I'd continue with the Unity physics, but is this a doomed project?

Cheers

Comment
Add comment
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 Reply

· Add your reply
  • Sort: 
avatar image
0

Answer by Andrii · May 25, 2016 at 04:19 PM

No it's not doomed. I'm working on a similar project and I've had similar problems. It looks to me that your problem is related to ground detection. I've had to try few different techniques to make it work properly for me. If you're making a platformer that is really precise, you should always know for sure if the player is standing on the ground. It will require you to learn a bit about how collisions work in Unity and a bit about raycasting if you haven't learned that already. Another thing that helped me was tweaking rigid body setting for the player (and other characters). Especially changing collision detection to continuous - this seems to make collision detection much more precise for that object.

Comment
Add comment · Show 2 · 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 paragraph7 · May 25, 2016 at 04:31 PM 0
Share

I've actually tried alot of collision detection techniques (Raycasts, OnCollisionEnter, OnTriggerEnter to name the main ones). I guess what I'm asking is that will I run into physic glitches with the Colliders in the long run where the collision detection should work but for some reason, just for a frame, does not? Just a moment ago I had a collider that just didn't trigger OnTriggerEnter althought it was a copy pasted version of a collider that had been working up until that moment just fine. Another glitch I've ran into is that my character's BoxCollider sometimes registers a collision with an obstacle some 1 pixel before the actual collision, like the engine would be calculating that a collision will take place next frame, and jumping the gun.

avatar image Andrii paragraph7 · May 25, 2016 at 04:55 PM 0
Share

I'm not experienced enough to say that Unity's physics engine is glitchy. So far I could overcome any problems I had with my platformer by changing the technique or tweaking some setting. I didn't have problems you're describing. I guess existing engine works in most cases but if you want to do something specific, you can write your own checks that would work better for your case. Some people ditch physics engine entirely and write their own system to manage movement of the objects, gravity, velocity in a way that suits their game better. It's probably O$$anonymous$$ to do it for some small 2D games. But I think that it's better to learn how to properly utilize existing system. There should be ways to work around the issues you're seeing.

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

105 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 avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

How would I go around making a gravity gun type system in 2D? 0 Answers

Three out of four of these raycasts aren't working 0 Answers

stick-figure piercing 0 Answers

Good Solution to Physics Based Gameplay 1 Answer

How works realistic grass like in the game Ori and the Blind Forest 1 Answer


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