Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 12 Next capture
2021 2022 2023
1 capture
12 Jun 22 - 12 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
0
Question by manikiran22 · May 22, 2019 at 07:00 AM · spriteboxcollider2dcolission

My Box collider 2D does not follow the sprite when its jumping.

So I'm trying to make my quad jump on Y-Axis however when doing so the boxcollider2d takes time to catch up with the sprite which is causing it have inaccurate collisions with the obstacles.alt text

collision.png (3.6 kB)
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 xxmariofer · May 22, 2019 at 07:15 AM 0
Share

can you share the code you use for moving the box?

avatar image tormentoarmagedoom · May 22, 2019 at 08:15 AM 0
Share

Hello.

Please provide code, and this image does not help at all.. what we suposed to see here?

Post 3-4 images to see how it happens, post a video, post image of inspector, image of icheracy... INFO !

2 Replies

· Add your reply
  • Sort: 
avatar image
1

Answer by manikiran22 · May 23, 2019 at 04:36 AM

sorry for the inconvenience guyz @tormentoarmagedoom , @xxmariofer was in a hurry. Attaching the code and a video of the behavior. So what i did was make all the jumping possible through raycasts and some box colliders.

Adding vertical collision code only since it's not taking more than 1 snippet.

Video Link: https://imgur.com/a/dodP9ww alt text

alt text


raycast.png (46.7 kB)
controller-2d-3.png (65.6 kB)
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 Dalsia · May 23, 2019 at 05:12 AM

I had a similar issue a few months ago. The issue has to do with one of Unity's settings. You need to go to Edit --> Project Settings --> Physics2D and check the box that says "Auto Sync Transforms."

Edit: I see you're a man of culture as well and are making your own raycast system; here's my post in case you're interested: https://answers.unity.com/questions/1593308/2d-why-arent-my-raycasts-conforming-their-origin-p.html

Edit 2: This other post may also be useful for you. I discovered that adding a kinematic Rigidbody2D fixed the discrepancy between my Quad's position and its box collider 2D. https://answers.unity.com/questions/1575939/why-is-my-quad-not-moving-in-sync-with-its-collide.html

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

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

141 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 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

Push only 1 box around at a time (2D) 1 Answer

Why is my quad not moving in sync with its collider? 1 Answer

Sprite collision with Tilemap 2 Answers

How to update the Box Collider 2D based on Sprite Size? 0 Answers

Does PolygonCollider2D.OverlapPoint() perform differently in Unity player than an Android device? 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