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
0
Question by haico1992 · Jun 16, 2014 at 07:22 PM · collider2d-physicsplatform

(Super Mario)Collide when walking on multiple box-collider platform

alt text

The box colliders are all same side, same "Y". The character sometime still stuck when walking to the next block, but most of the time he can go smoothly with no problem. I tried to increase the accuracy of physic(dicretes->continueus) on character, doesn't help. Anyone else got the same problem?

untitled.jpg (22.4 kB)
Comment
Add comment · Show 4
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 haico1992 · Jun 16, 2014 at 07:35 PM 0
Share

p/s: I'm using transform.velocity to move the character

avatar image haico1992 · Jun 17, 2014 at 03:34 AM 0
Share

One more time, this should be a common problem, isn't it?

avatar image JayOhhh · Jun 17, 2014 at 10:19 PM 0
Share

What does the collider on $$anonymous$$ario look like? I suspect its getting caught on the edge.

avatar image haico1992 · Jun 18, 2014 at 03:53 AM 0
Share

$$anonymous$$ario having BoxCollider2D. It do get caught at the edge. Adding a Physics$$anonymous$$aterial2D with friction=0 can reduce the chance of this happen dramatically, but it still around.I want to totally eli$$anonymous$$ate it. ![alt text][1]

untitled.jpg (31.1 kB)
untitled.jpg (31.1 kB)

3 Replies

· Add your reply
  • Sort: 
avatar image
0

Answer by Rxanadu · Jun 18, 2014 at 04:05 AM

The box colliders for the blocks look to be overlapping each other. Are the Question blocks and brick blocks separate objects, or are they just one sprite?

Either way, I would suggest changing the sizes of the box colliders so they don't overlap each other. That should allow for a smoother area for the player to walk on.

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 haico1992 · Jun 19, 2014 at 03:46 AM 0
Share

The Question block and brick block are separate collider. It doesn't work when they not collide too. I made them collide just for testing if it can work (not)

avatar image
0

Answer by pacific00 · Jun 18, 2014 at 04:25 AM

if possible try to create a single box collider for a whole section of the wall.. instead of individual blocks with colliders.. you will have to code it instead of manually attaching colliders..

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 haico1992 · Jun 19, 2014 at 03:49 AM 0
Share

Can't do that, $$anonymous$$ario have to jump through those brick after break them too. And it is .. "dirty" to have code for each array of block in game like that. (If you know what I mean ;))

avatar image
0

Answer by hexagonius · Jan 16, 2016 at 12:49 PM

The behaviour of colliding with a box when moving another one from the side is a known, by design, issue, which is explained here and won't be fixed:

http://issuetracker.unity3d.com/issues/collision-issues-when-using-2d-box-colliders

I think the suggestion with putting a collider around the whole arrangement is a good approach. When jumping against it from the bottom, you could check which was the closest block, destroy it and recalculate the collider (split it up). Since mario is more like a matrix level, that shouldn't be too hard. If you want to do bottom up jump through, I think Unity 5.4beta1 is capable of that.

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

6 People are following this question.

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

Related Questions

Edit tilemap cillider edit z hight 0 Answers

How do you set an order for 2D Colliders that overlap? 7 Answers

Player Gets Stuck On TilemapCollider2D 0 Answers

Raycast 2D with origin inside the collider 1 Answer

How do I stop a player from bouncing on a descending platform? 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