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 NanoEngine · Jul 01, 2017 at 07:49 PM · movementphysicsrigidbodyrigidbody physicsstairs

Rigidbody climbing stairs

Hello, I'm currently developing a First Person Game with my own Rigidbody First Person Controller, and I faced this problem, where player cannot climb the stairs up. I'm controlling the player movement using rigidbody velocity. I know that it is possible to make the player climbing the stairs up by not giving the physics (transform.Translate), but I do not prefer that method, since it can't handle the fast movement (my game is fast paced). I've also seen a video, with the colliders and triggers, and I do not want to do that either.

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

2 Replies

· Add your reply
  • Sort: 
avatar image
1

Answer by Bren0831 · Jul 02, 2017 at 09:06 PM

How about you replace the stairs collider with a sloped collider. That way you can climb the stairs, They still look like stairs and it should fell natural if you add in some camera movement with that.

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
-2

Answer by Mercbaker · Jul 01, 2017 at 09:53 PM

For player movement up stairs I'd use this > Character Controller

Comment
Add comment · Show 5 · 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 NanoEngine · Jul 02, 2017 at 08:37 AM 0
Share

That doesn't really help, because I'm trying to implement climbing stairs in rigidbody.

avatar image Mercbaker NanoEngine · Jul 02, 2017 at 05:11 PM 0
Share

You should post your code and an image of your gameplay.

If you use rb.velocity on an object it will go up slopes without problems.

If it isn't then you have a unique case and need to post more info.

avatar image NanoEngine · Jul 02, 2017 at 07:03 PM 0
Share

I can climb the slopes. But i'm talking about the stairs...

avatar image Mercbaker NanoEngine · Jul 02, 2017 at 08:13 PM 0
Share

How do you expect any help if you don't post sufficient details about your project? I know what stairs are; but, you don't seem to know that in most of all cases, the collision for stairs is a simple slope.

So if that isn't related to YOUR project, then post the specific scenario you have. If the problem is collision, then post an image of your collision mesh and player move code and collider.

avatar image NanoEngine Mercbaker · Jul 03, 2017 at 06:44 PM 0
Share

You can't expect rigidbody to climb the stairs up, if you use rigidbody movement script. It is not possible due to physics. Rigidbody has real physics, but character controller doesn't. That's why it's possible in character controller. I have found out that unity has made a solution for it by the way. It was adding force manaully when climbing the stairs up (y velocity). It can be found in rigidbody fps controller script in unity's standard assets.

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

134 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 avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

Keep Horizontal Momentum after Jump 2 Answers

RigidBody.MovePosition seems jerky in movement 0 Answers

stop vehicle from moving through walls 1 Answer

Rigidbody keeps sliding 0 Answers

Moving a rigidbody towards the mouse position 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