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 /
This post has been wikified, any user with enough reputation can edit it.
avatar image
0
Question by agora · Jun 19, 2014 at 12:47 AM · rigidbody2dupdatecollider2dglitchjerky

Unity 2d > Player sprite jerks on x axis with no force applied

Hi, This is my first unity project, it is almost complete. I have a bug which i noticed only a few days ago.

The player is a sprite with rigidbody2d and 3 colliders, it falls from the middle of the screen until it collides with the ground. The ground is a sprite with box collider2d with no rigid body. The camera is not moving - ortho.

I have enemies advancing from the right and pushing the player to the left. almost every time i start the level (but not every time) the player make a small jump (glitch) a few pixels to the right. before any sprite approached him, or any force applied to him.

I would put any code here which helps, but i don't know where to begin looking. please if this sounds familiar to anyone i appreciate any help.

Another glitch which might be related: the sprite changes animation with animator controller state machine once touching the ground (animator trigger). every once in a while the sprite transitions to the touch ground animation, without being close to the ground. I suspect some unseen collider but cannot find anything.

Thanks!

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
Best Answer

Answer by agora · Jun 23, 2014 at 01:17 PM

I found the answer after a few days, if any new user makes this same mistake and finds this answer, hope it helps:

My main character has a rigidbody2d attached to it, but the physics calculations were done on update(); once i moved the addforce to FixedUpdate() all glitches were solved.

this is the method i used: http://gamedev.stackexchange.com/questions/73713/update-vs-fixedupdate-in-unity

Comment
Add comment · Show 1 · 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 prabhstein · May 07, 2015 at 10:32 AM 0
Share

Am the one who had the same problem but now its got solved... Thanks a lot!!!!

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

2 People are following this question.

avatar image avatar image

Related Questions

2d rigidbody falling from the collider when it is moved 3 Answers

"Failed to update Unity Web Player" 0 Answers

2D Physics based rotation looses precision after hours 0 Answers

Moving colliders that are part of a composite collider 1 Answer

Making 2D objects solid, so that they do not pass through eachother? 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