• 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 PreetMinhas · Mar 07, 2013 at 10:19 AM · collisioncharactercontrollersideways

CharacterController collision - weird behaviour

I have a CharacterController (CC) in my game. The movement of this object is controlled through the CharacterMotor script. When the CC is moving on the ground, the OnControllerColliderHit() function reports that it is touching the ground. However, whenever the CC collides with an object in its path, the CC cannot move further in the direction but the OnControllerColliderHit() function does not provide the collided gameobject as the hit.gameObject but still keeps referring to the ground.

Any idea what I might be doing wrong? I have searched the forums but haven't been able to come across any similar issue.

Comment
Add comment · Show 2
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 MountDoomTeam · Mar 07, 2013 at 10:36 AM 0
Share

did you check if the character controller has an adjustment for the maximum step of height of things it can walk over? I know that the 1st person character controller has adjustments in the options for maximum step height, maximum slope , etc

avatar image PreetMinhas · Mar 07, 2013 at 11:41 AM 0
Share

I don't want it to step over things. I want it to recognize the object in front i.e. give me the correct gameobject it collided with when moving forward.

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.

Welcome to Unity Answers

The best place to ask and answer questions about development with Unity.

To help users navigate the site we have posted a site navigation guide.

If you are a new user to Unity Answers, check out our FAQ for more information.

Make sure to check out our Knowledge Base for commonly asked Unity questions.

If you are a moderator, see our Moderator Guidelines page.

We are making improvements to UA, see the list of changes.



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

OnCollisionEnter Push Object Problem 0 Answers

Collision Detection in Capsule Collider 0 Answers

Mesh separating from CharacterController 0 Answers

Character Controller slows game heavily on Android 0 Answers

Physics AddForce reduced when 3 objects are colliding 1 Answer

  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges