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 skEncrypt · Oct 12, 2012 at 03:11 PM · collisionrigidbodycollider

Rigidbody colliders

Hey guys! Doing pretty well so far on my game, have interpolation working correctly so it's finally "lag-free" so to speak, I've got a slight problem now though, I wish to start adding more objects to my map like walls and of course I need to make it so that these walls cannot be passed through so the simple solution would be to give the walls a rigidbody component and then do the same with my player object but when I do this the projectiles that my player fires end up destroying my player, even though I'm using:

 Physics.IgnoreCollision(clone.collider, transform.root.collider);

I've no idea why this is happening as I'm pretty new to unity, could anyone shed any light?

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 Fattie · Oct 12, 2012 at 04:57 PM 0
Share

is this $$anonymous$$P ??

avatar image skEncrypt · Oct 12, 2012 at 05:21 PM 0
Share

Yep it's multiplayer

1 Reply

· Add your reply
  • Sort: 
avatar image
0

Answer by bateleur · Oct 12, 2012 at 05:35 PM

Does your player maybe have more than one Collider attached to it? The thing about IgnoreCollision is that is only operates on a single Collider (or rather, a single pair) so if your Rigidbody has more than one associated Collider due to the character model involving more than one, that might be the problem.

For some game it's more practical to change the layers of the various characters and bullets and then set the layer collisions up so that the player's bullets can only ever collide with walls and enemies.

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 skEncrypt · Oct 12, 2012 at 06:43 PM 0
Share

Nope, the only colliders attached are 1 box collider on the player and 1 box collider on the projectile, I also thought of using layers but enemies and players use the same prefab (because its multiplayer) so I decided I'll have to try another way.

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

11 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

Related Questions

Collider going through walls with box collider.. 1 Answer

My Character controller is being push a little bit when i'm about the get the coins. How can i possibly detect collision and destroy the coins without actually getting affected by the colliding physics? 1 Answer

Objects with colliders going through walls and each other. 3 Answers

GameObject ignores collision while swinging from hinge joint 2D 4 Answers

Velocity data from OnCollisionEnter is delayed (incorrect) 3 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