• 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
Question by maddFrogg · Mar 14, 2014 at 10:59 AM · collisioncollidercharactercontroller

Character controller falling down

Hi guys,

I have a character controller in my scene on a diagonal plane. My game moves the plane to the camera insted of moving the character forward, as it is an infinite runner game.

The fact is that if I move the scenary towards the player, the character controller (doesn't update collisions?) falls down instead of going up the ramp. It works correctly if I call CharacterController.Move, but as I said before, my game does not work this way.

Is there any method to make the character controller update without moving it?

Thanks!

Comment

People who like this

0 Show 0
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

Answer by LMan · Mar 14, 2014 at 01:16 PM

Might be crazy, but what if you put a constant force component on the character controller? And set the constant force to be just enough to counter the force that is making him fall down the ramp.

Comment

People who like this

0 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 maddFrogg · Mar 14, 2014 at 01:34 PM 0
Share

The force that is making him fall down is gravity. Not the physics one but a force applied by me to make the controller be grounded.

If I counter it, the character will be floating around and not even able to jump and fall down to the floor again, and it won't go up the ramp either.

As ar as I know, the controller needs to .Move to be updated. What I'm doing now is calling this

 controller.SimpleMove( Vector3.forward * 0.0000000001f );

The controller updates and the forward movement is practically 0, but it feels so much weird.

avatar image LMan · Mar 14, 2014 at 04:14 PM 0
Share

aha, so what you need is a cue for your gravity to stop pushing when the character is on the ground. Would the variable isgrounded on the controller work for that? Or does that not return true because of the slope? if not, Perhaps you could use OnCollisionEnter() to get collisions with the ground plane and do your own version of isgrounded.

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.

Welcome to Unity Answers

If you’re new to Unity Answers, please check our User Guide to help you navigate through our website and refer to our FAQ for more information.

Before posting, make sure to check out our Knowledge Base for commonly asked Unity questions.

Check our Moderator Guidelines if you’re a new moderator and want to work together in an effort to improve Unity Answers and support our users.

Follow this Question

Answers Answers and Comments

21 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 avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

OnCollisionEnter not working 1 Answer

Collision between CharacterControllers 1 Answer

CharacterController can jump through moving objects 1 Answer

Differences of OnCollisionEnter, OnTriggerEnter vs OnControllerColliderHit? 1 Answer

OnTriggerEnter() and OnCollisionEnter(), OnControllerColliderHit() not working with character controller 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