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 AlucardPR · Feb 28, 2013 at 07:17 AM · collision detectionplatformercharacter controllermesh collider

Collision problems (character controller - mesh collider)

Ok, I am making a 2.5 platformer in which I used a first person object and by script, gave it the necessary behaviors so it plays like a side scrolling platformer. For collisions the object has a character controller.

I started to build a level which has several rotating gears where the player needs to time the jumps in order to get onto the next one and so on. The gears have mesh colliders.

The thing is that when I apply rotation movement on the "gears" it somehow screws up the collision detection. It seems that when the character lands on the gear's teeth there is no problem, but as soon as I move it and the character falls into the space between the gear's teeth, it goes through.

Details:

-The gears were made in blender (extra object/gear) and I made them look solid by merging the vertices on the donut shape of the gear so it looks as if its solid.

  • tested collisions without the gears rotating (static) and it gives no problems.

-Tried increasing the slope limit on the character, but that didn't solve anything.

My guess is that this has something to do with the rotation of the gears or the fact that the gears have a donut shape and are not solid on the inside.

Any help will be greatly appreciated, thanks in advance Unity community!

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
0

Answer by aldonaletto · Feb 28, 2013 at 11:56 AM

Maybe this is due to a known problem with the CharacterController: it tends to fall through platforms that move up. A common workaround for this issue is to keep the CharacterController moving all the time at a ridiculous speed - for instance:

 function Update(){
   var cc = GetComponent(CharacterController);
   cc.Move(Vector3.forward * 0.0001 * Time.deltaTime);
   // rest of Update code
 }

This code moves 0.1 milimeter per second in the world Z direction, a hardly noticeable movement - but big enough to do the magic.

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 AlucardPR · Mar 01, 2013 at 07:57 PM 0
Share

Interesting, I will check up on that right now.

avatar image AlucardPR · Mar 01, 2013 at 08:20 PM 0
Share

It did not work, the character does move a little but it is still falling through.

UPDATE I fixed it! It seems that the gear was indeed hollow on the inside and that was the reason why the character was going through. I just went into blender and embedded a cylinder inside of it so it served to make it thicker and now it works perfectly

Thanks anyway :)

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

10 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

Related Questions

CharecterController.Move() ignores parents movement 0 Answers

Player going through curved walls imported from blender 1 Answer

2D Platformer Raycasting vs. Rigidbody collisions 0 Answers

collision detection on user-controlled rigidbodies 1 Answer

Scene switching and loading problems 0 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