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 Jordan Miller 2 · Oct 11, 2010 at 05:43 AM · slopesfpswalker

first person controller doesn't slide down slopes

I am using the first person controller prefab (the pill shaped guy) with a slightly modified script. I can jump up mountains, he doesn't slide down really steep slopes. why not? and how can I get him to? or on the other hand how can I get him to walk up any slope without having to jump? in short, how can I be in charge of the slopes my player is able to navigate?

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 jonas-echterhoff · Oct 11, 2010 at 10:17 AM

To get the player to be able to climb steeper slopes without jumping, you just have to change the slopeLimit parameter to an angle of your choosing.

To get it to slide down slopes of certain angles, you have to manually implement that in you character controller script. In your OnControllerColliderHit function, check for collision with the ground, and move the character controller sideways based on the direction and angle of the normal received.

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 Jason.00 · Mar 04, 2013 at 10:18 AM 0
Share

where is the "slopelimit parameter"? is that the'slope speed multi'?

avatar image
0

Answer by DannyJax.du · Oct 12, 2010 at 02:59 AM

you can change the slope variable but remember that limiting the slope allows you to use mountains and steep slopes to restrict players from getting past a certain point and thus they fall off the map.

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 Caps · Dec 10, 2010 at 03:11 PM

Hi,

I think the question is how do you get the slope angle so that the sliding can be implemented.

Just settting the slopeLimit does no action of sliding, just limits the character "not to go up any further".

This is what Im trying to find out as well, but Character Controller lets you retreive this variable?

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 KainAsylum · Jul 08, 2014 at 08:55 PM

You can get the ground normal by implementing OnControllerColliderHit in any component that lives on the same gameObject as the Character Controller

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

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

2 People are following this question.

avatar image avatar image

Related Questions

Limit Diagonal Speed 2 Answers

Why is my CharacterController slowing on hills? 3 Answers

Grounded check not working on sloped ground. 1 Answer

I can't make my character walk up stairs or slopes using the following code and rigidbody. Can someone help? 2 Answers

FPS Walker Script Location in the latest Unity version 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