• 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 rahim_jessani · Sep 14, 2016 at 12:27 PM · unity 5rigidbodycharactercontrollercollision detectionstandard-assets

Character not moving on slopes

hey peoples, i am using unity standard asset AI Character Control asset but i am facing some problems with that. Basically the problem is when i am trying my character to move on the slopes it just ignore that and passes the collider even without getting stoped. the codes i am using are listed below :

 private void FixedUpdate()
         {
 
 
             if (target != null)
             {
                 if (current_pos_id < target.Count)
                 {
                     agent.SetDestination(target[current_pos_id].position);
                     
                 }
                 else
                     character.Move(Vector3.zero, false, false);
             }
 
             if (agent.remainingDistance > agent.stoppingDistance)
             {
                 character.Move(agent.desiredVelocity, false, false);
 
 
             }
             else
             {
                 if(character.transform.position.y != target[current_pos_id].position.y)
                 {
                     character.transform.position = new Vector3(character.transform.position.x, target[current_pos_id].position.y, character.transform.position.z);
                 }
                 Debug.Log("character " +character.transform.position);
                 Debug.Log("ideal "+target[current_pos_id].position);
                 current_pos_id++;
                 
             }
         }


can anyone help to solve this problem Thankyou

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

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

3 People are following this question.

avatar image avatar image avatar image

Related Questions

Collider with rigidbody does not register collision with terrain 2 Answers

Stop objects from going through each other with rigidbodies 1 Answer

Problem with CharacterController collision detection 1 Answer

Collision Not Working 1 Answer

Strange Quadruped Root Motion and Rigidbody Physics 0 Answers

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