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 Gebreel · Nov 09, 2013 at 03:23 PM · 2dcollisionslidingpushing

Pushed objects randomly sliding into walls

I have a player, a bunch of 2D circles following it, and some walls. The scene is in "2D", with the sprites having 3D colliders extending downwards. I can push the enemy circles around, and while sometimes the walls block them from being pushed, sometimes [randomly] it does not, and they just slide into the walls. I googled a lot, and found out you should not use transform.translate for this - so I changed it to rigidbody addforce methods, but it still did not help.

Here is a picture of how it looks like: alt text

Any ideas what could be causing the problem?

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 Triqy · Nov 09, 2013 at 03:37 PM 0
Share

so is your player pushing the 2d circles around and then sometimes they get stuck in the walls? $$anonymous$$aybe you can explain it better.

avatar image Owen-Reynolds · Nov 09, 2013 at 03:45 PM 0
Share

If you select one, then in scene mode, you'll see the green collider. If may be going over/under the wall (so make things thicker) or being left behind (impossible normally, but depending how the red things were set-up and coded... .)

avatar image Gebreel · Nov 09, 2013 at 03:59 PM 0
Share

Thank you Owen, it helped! I have one more problem now tho, a part of enemy is dliging onto the wall, and then bumping out instantly - it happens continuously when it is being pushed against the wall - can I remove that effect? Can it be compltely solid?

avatar image Gebreel · Nov 09, 2013 at 04:59 PM 0
Share

And ALSO, connected enemy circles are applying friction to the player ... Say, there is a "tail" of enemies, each one touching another one, going all the way to the player, and also one of them touching the walls - the player slows down then, just like he was going sideways against the wall himself ... Which is really weird. I have tried changing physical$$anonymous$$aterials to have 0 friction, but it did nothing :/ It's kind of like one enemy was holding on to the wall, others holding on to each other to create a chain, and the last one holding player so he couldn't escape - while fun, it's not what I really want ...

0 Replies

· Add your reply
  • Sort: 

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

19 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

Related Questions

2D Detect collisions of a 2D block only on left/right (not top/bottom) 0 Answers

Ignore collision at high velocity. 1 Answer

Change shape of object upon collision 1 Answer

Colliders in a wall jut out 0 Answers

Collision & 2D 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