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
1
Question by xfirestormx · Aug 23, 2014 at 02:26 AM · collisioncolliderboxcollider

Help with collision mechanics

I am working on a naval game with ship to ship based combat. To control player and enemy movement I am using character controllers which works fine for getting everything to work as I want except collisions. As my ships are not spherical in nature, I have created child box colliders for my ships, but no matter what I do I cannot seem to stop my ships from moving through each other. I am quite new to scripting, and the collision systems in Unity just make no sense to me. I have tried a multitude of combinations with rigidbodies, colliders and colliders as triggers, but have had no success.

All I want is for my child colliders to register collisions with the child colliders of other ships, but so far this seems to be impossible without the use of rigid bodies, which do not seem to get along with the character controller (even if the colliders are on a separate layer which should not collide). If anyone could shed insight on to this matter, or introduce a work around so that the collisions will work properly, it would be greatly appreciated.

Comment
Add comment · Show 3
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 Qo2770 · Aug 23, 2014 at 05:46 AM 0
Share

Could you gives us your script and a photo of your scene?

avatar image xfirestormx · Aug 24, 2014 at 07:59 PM 0
Share

Forgot to post back, I actually managed to sort of fix the problem myself by adding rigid bodies to the child colliders and then increasing the size of the character controllers a bit. It's not completely perfect, but my ships no longer move straight through each other so I'm chalking it up as a victory.

avatar image AlwaysSunny · Aug 25, 2014 at 04:29 AM 0
Share

Just a friendly warning: There are exceptions, but it's generally bad juju to mix character controllers with rigidbodies in the fashion you describe.

As much as it may be a bummer - and again, depending on your goals - it may be wise to drop the character controller from your whole project. They do one thing fairly well, and this isn't it.

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

4 People are following this question.

avatar image avatar image avatar image avatar image

Related Questions

Box collider didn't jump with player 1 Answer

OnCollisionEnter wheel collider error! 4 Answers

How can I make diagonal collisions work with raycasts from a boxcollider? (3D, C#) 0 Answers

Simple two cube collision is not good? 0 Answers

Is it possible to scale one face of a box collider?? 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