• 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 domoemmanuel99 · May 04, 2016 at 05:29 AM · terraincharactercontrollercharacter controllerslopesjetpack

[Character controller] run faster on slopes and jetpack

i have a character controller and a script to control it, i have a terrain with hills and i want to make the character run on downhills, and then jump higher on uphills, and then, active jetpack...Like in this video

thanks in advance guys

Comment
Add comment · Show 4
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 Cherno · May 04, 2016 at 12:07 PM 0
Share

If the character is grounded and his position.y decreases between frames, then he is apparently going downhill (or descending a ladder). Increase the horizontal velocity in this case. A Jetpack functionality would start with increasing the y velocity on buton presses, I would imagine, and possible disabling gravity effects.

avatar image domoemmanuel99 Cherno · May 07, 2016 at 03:05 PM 0
Share

do you know how to make it in script???.. please bro, i need help

avatar image Cherno domoemmanuel99 · May 13, 2016 at 10:49 PM 0
Share

With what do you need help? First of all, you didn't say what kind of CharacterController you use. Is it the one from Standard Assets, or a custom one? either way, you should take a look at how it works and you will probably see that it has a grounded bool variable. You also know that each GameObject has a Transform component, and that transform.position is a Vector3 variable that consists of x,y and z. So you also know that you can read the y position. A CC also has a velocity which can be set according the movement mode of the character (running, walking etc.) as well as the gravity.

So, since you know (you could know, since it's all included in the CC) all these things, what is your question? :)

Show more comments

1 Reply

· Add your reply
  • Sort: 
avatar image
0

Answer by PaulPer_TF2 · May 09, 2016 at 07:22 PM

One thing to test is try applying different material types to the hills. Slippery could work on the downhill and bouncy might work on the uphill to make them jump higher.

Comment
Add comment · 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 domoemmanuel99 · May 13, 2016 at 09:09 PM 0
Share

... it sounds great... but... im using a unity terrain... so,how i can do what you say ?

avatar image domoemmanuel99 · May 15, 2016 at 03:32 AM 0
Share

lol.... i think this cant work... because all the downhills are a uphill at the same time :v so... the problem here is how to check if the player is going downhill, and when is going uphill :(

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

5 People are following this question.

avatar image avatar image avatar image avatar image avatar image

Related Questions

Character Controller Slope Limit on Terrain 0 Answers

How can I make my FPS player move towards the direction it is facing 1 Answer

Character Controller and Terrain collisions are expensive? 2 Answers

Character Controller Move in X and Z axis via camera 1 Answer

How do I get a prefab to access a character controller from another object? 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