Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 12 Next capture
2021 2022 2023
1 capture
12 Jun 22 - 12 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 neroid · Dec 03, 2016 at 09:35 AM · controllergravitywalkingstairs

Cant walk up stairs need a bit help more info inside.

i have some stairs made in blender with a ramp made but the problem is i cant make my model actually climb it falls down in the prossess of climbing,i use the third person controler that exists in unity for now due to my model flying off the map in a small ramp with it i also modified its script to have the scale up to 100 gravity *1f . If you got a better gravity model il appreciate it. It only needs crouch,walking,running and im still learning java so it will be a valuable lesson while at it. I got the animations so no deal in other stuff while at it :3 thanks for helping ^_^.

Comment
Add comment · Show 18
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 Bryangs · Dec 04, 2016 at 02:53 AM 0
Share

Do your character have a Character Controller component?

avatar image neroid · Dec 04, 2016 at 06:40 AM 0
Share

@Bryangs no but my controller it self has rigidbody.should i add a controller on the player?

avatar image Bryangs neroid · Dec 04, 2016 at 02:40 PM 0
Share

Well the Character Controller can help a bit depending on your script. $$anonymous$$ost character scripts require a Character Controller component to work. The character controller has an option that make possible for you to walk in things more elevated, it's called Slope. The standard is 45, but you can change it to whatever you want. You should try it. Add a character controller to your model, and play a little with the slope limit and see if you can walk the stairs now.

alt text

slope.png (7.7 kB)
avatar image neroid Bryangs · Dec 04, 2016 at 06:35 PM 0
Share

while keeping the rigidbody it seems to make her levitate at the begining and also making her fly a bit as well when walking in them does it have to do with gravity?

Show more comments
Show more comments
avatar image Bryangs · Dec 04, 2016 at 11:13 PM 0
Share

I think i got it. Also your problem was "$$anonymous$$inda" solved, wasn't it? Anyway, this is probaly happening because your stair collider is flat a.k.a primitive.

By the way, @Cherno, look at this: alt text

You know, it CAN work. I said CAN.

avatar image Cherno Bryangs · Dec 05, 2016 at 01:36 AM 0
Share

Whatever you were trying to show, it is broken :(

avatar image neroid Bryangs · Dec 05, 2016 at 04:56 AM 0
Share

so then whats the solution? if she tries to walk on top of it she will either not climb it at all or use it as a launch pad.

avatar image Cherno neroid · Dec 05, 2016 at 01:07 PM 0
Share

I can only say that with the (first person) CharacterController setup waling on sloped is no problem.

Show more comments
avatar image Cherno · Dec 05, 2016 at 09:13 PM 0
Share

I'm still not sure why you are using Unity's Third Person CC with a RigidBody. This is a big mistake.

avatar image Bryangs Cherno · Dec 06, 2016 at 01:26 AM 0
Share

Yep, first person uses both, and as you said this doesn't make sense so why is it even using both? Now you got $$anonymous$$E confused =S

avatar image Cherno Bryangs · Dec 07, 2016 at 10:46 PM 0
Share

I don't know what you mean by "why is it using both". The 1st Person CC included in Standard Assets is not using a RigidBody.

2 Replies

· Add your reply
  • Sort: 
avatar image
0
Best Answer

Answer by iAmAwsum · Dec 05, 2016 at 02:58 PM

Try creating an empty gameobject, adding a boxCollider to it and extending it diagonally up the stairs. alt text


5de801104e5fcf5211fa62e9d46f7b32.png (31.9 kB)
Comment
Add comment · Show 3 · 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 neroid · Dec 05, 2016 at 04:45 PM 0
Share

the problem though isnt the actual mesh/collider its that it uses that collider as it walks on top of it the gravity pulls her back to where she started and if used from top to bottom its using it as a slide

avatar image Bryangs neroid · Dec 05, 2016 at 07:24 PM 0
Share

Try creating a lot of cubes, scale and disable their mesh renderers OR create a lot of empty game objects and put some colliders on them. Then use one cube/gameobject for each stair, ins$$anonymous$$d of using a single ramp.

avatar image neroid Bryangs · Dec 07, 2016 at 05:04 PM 0
Share

correct mate,i changed my entire controller removed rigidbody placed on cc.

avatar image
0

Answer by lylat · Dec 08, 2016 at 08:14 AM

Raising the step offset would also help you move up the stairs.

Because if you have lots of cubes, they might be slightly larger than the step offset in height which is what allows you to go over bumps that are beyond the slope limit.

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

7 People are following this question.

avatar image avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

Do character controllers work with dynamic gravity? 1 Answer

Does First Person Controller have infinite mass? 1 Answer

Wall Climbing and Default Gravity 1 Answer

Problem with character movement 2d when attaching animator 1 Answer

Why is my rigidbody getting stuck in the air when using mouse movement? 1 Answer


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