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 Felix King · Sep 09, 2012 at 04:51 PM · collisionphysicsplatformercharacter controllerplatform

How to prevent Character Controller from falling through moving Platforms?

My Character Controller reproducibly falls through vertically moving platforms. The Character is parented to the moving platform as soon as it enters a trigger box colider above it.

This fall trough is more likely to happen if the charcter falls a long distance and if the platform is moving up. Or with other words: the stronger the collision force is the more likely it is that the character slips through the platform. At a certain force it always falls through.

Any help is much appreciated!

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

4 Replies

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

Answer by Felix King · Sep 11, 2012 at 07:11 PM

For me changing the Fixed Timestep in Edit -> Project Settings -> Time down to 0.01 solved the problem.

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

Answer by DesiQ · Sep 09, 2012 at 09:23 PM

There is a Moving Platform field in the Character Motor script of the default Character Controller in Standard Assets. Did you enable it?

Comment
Add comment · Show 3 · 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 Wuzseen · Sep 11, 2012 at 07:01 PM 0
Share

DesiQ I have the exact same problem as Felix $$anonymous$$ing and the $$anonymous$$oving Platform field did not solve the problem, the player character still falls through moving platforms handily. I've had this problem for weeks now actually and I'm planning on switching to a rigidbody/physics controller...

avatar image DesiQ · Sep 11, 2012 at 07:08 PM 0
Share

I don't know much about it because I haven't had to implement it myself. I'd suggest reading through the Character $$anonymous$$otor script to understand how the moving platform option works. $$anonymous$$aybe there's a way to tweak it for your game.

avatar image Felix King · Sep 14, 2012 at 02:31 PM 0
Share

For me that didn't help as well. The only thing that helped was changing the Fixed Timestep in Edit -> Project Settings -> Time down to 0.01. The Character only falls through the moving platform when jumping on them from rediculous heights. But you could go even lower with the fixed timestep to prevent that. I have to check how much it affects the performance on mobile devices though ...

avatar image
0

Answer by Felix King · Sep 11, 2012 at 10:40 AM

Thanks for the Feedback. I did not know about that! Looks like I have some additional research to do ;)

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 DesiQ · Sep 11, 2012 at 06:48 PM 0
Share

Remember to mark my answer as correct if it solved your problem.

avatar image
0

Answer by avidesk · Sep 14, 2012 at 04:17 PM

Fixed timestep will surely help, but sometimes you can only get it to go so low before it impacts performance. Changing the collision detection mode of your object's rigidbody to Continuous or Continuous Dynamic is probably what you want. Now if the collision occurs between two fixed time steps, it will still be detected. If that happens and collision mode is set to Discrete, the collision is not detected and it passes through.

(Only use this for objects that need it, it will impact performance if used all over the place)

Unity Script Reference - Collision Detection Mode

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 Felix King · Sep 14, 2012 at 04:36 PM 0
Share

Thanks! I played with that as well, but had some issues. First you need a rigid body ins$$anonymous$$d of a character controller, which means I have a lot to change and second the rigid body sometimes gets stuck a little bit while sliding down walls and in some occasions it "catapults" the rigid body into the opposite direction. I think this might be likely due to the poor quick & dirty implementation during the testing. For the next project I'm thinking about switching to rigid bodies.

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

2D 360 degress platformer example needed 0 Answers

Gun collision problem 3 Answers

Make character interact with object without using unity Physics 0 Answers

Collision problem 1 Answer

Determinism of collision judgment of Character Controller 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