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
1
Question by TheMPC · Apr 20, 2010 at 01:12 PM · collisionphysicsrigidbody

Rigidbody Collision?

Hello there, Well its pretty easy i think so lets start with what i have:

A level: this is a model imported from Maya with a Mesh Collider

A vehicle: this also is a model from Maya which is imported and has a Mesh Collider

Now what im trying to do is add physics to the vehicle so i added a Rigidbody (i do not know if this was the right thing to do though)

And when i played my scene the vehicle starts to fall and falls straight trough the level without any kind of collision.

What i was expecting is that it would hit the level and just stop there because it has colliders, also i tried this with the FPSWalker component, and that did work, though i want a physics object and not the FPSWalker.

Could anyone please explain me what i am doing wrong or give me some directions on how i can have my physics object collide correctly?

Greetings, TheMPC

Comment
Add comment
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

1 Reply

· Add your reply
  • Sort: 
avatar image
4
Best Answer

Answer by spinaljack · Apr 20, 2010 at 02:17 PM

Instead of using a mesh collider for the car use box colliders to approximate the shape, this is not only faster but also more accurate for fast car simulations.

Make sure that the terrain has a mesh collider, sometimes just importing a mesh doesn't give you any colliders. Click on the level, click on component > physics > mesh collider, it should appear as a component, the mesh variable should say the name of your mesh and the project view will show a wire frame of the mesh collider, if not it's not worked properly and you need to pick a mesh to drag into the slot. Have you tried creating a unity terrain instead? You can import your buildings and things to go on top of it.

Generally speaking with driving games it's best not to use thin colliders like lamp posts as your car can get stuck in them at high speeds. Here's a section on wheel colliders, wheel colliders can help you simulate things like wheel slip.

Here is a tutorial for a driving game that uses wheel colliders

Comment
Add comment · Show 2 · 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 TheMPC · Apr 20, 2010 at 03:54 PM 0
Share

Thank you for the helpfull information, will reply beack to this post once i tested the sollution tomorrow.

avatar image gl03 · Apr 19, 2012 at 03:43 PM 0
Share

I'd like to add a related newbie question: Using $$anonymous$$esh Colliders for level objects and a character controller for the player, I am currently walking (translating) through walls. Is this correct behaviour?

Should I use CharacterController.$$anonymous$$ove ins$$anonymous$$d of Transform.Translate for player movement? And what about mobs/enemies? What colliders / movement function should they use?

Thank you and apologies for the triviality of my question...

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

No one has followed this question yet.

Related Questions

physics culling mask? 1 Answer

Do you have to have a rigidbody component for collision detection? 1 Answer

Keep Horizontal Momentum after Jump 2 Answers

Collision.impulse = 0 in OnCollisionStay Kinematic Static collision pair after Update 0 Answers

Player's Rigidbody slides up terrain walls 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