• 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 devereux · Oct 22, 2015 at 08:03 PM · physicsbasic programmingfirstpersoncontroller

First Person Controller Physics

Alright, so I have noticed if you have terrain which is too steep to walk up (ie: vertical), if you press spacebar and forward, you can continuously jump and would be able to reach the top, this is very inaccurate physics, as there is little support force to hold up the user, without even considering balance.

How can I go about solving this?

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
0

Answer by Dinosaurs · Oct 22, 2015 at 08:56 PM

Check out this answer: http://answers.unity3d.com/questions/411616/slope-limiting-for-rigidbody.html

Basically you want to cast a ray downward from your character, compare the normal of the raycast hit against the world up vector, and not move if the result is below a certain threshold.

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 devereux · Oct 23, 2015 at 12:21 PM 0
Share

$$anonymous$$y problem was actually 2 issues:

  1. I can navigate up slopes I am unable to walk up by jumping repeatedly.

  2. There is no concept of support force, which is holding the player up. For Example, if i am standing on a point on a wall which is 90 degree's vertical, making completely upright and I am standing on about "1 mm" of terrain which is supposed to be holding up my player. In the real world, you would be incompletely incapable of standing on 1mm of terrain due to your center of gravity, and balance. I should be falling. How could I implement this?

avatar image Dinosaurs devereux · Oct 25, 2015 at 03:10 AM 0
Share

Using the same technique, you could check if the player is standing on a slope and disable jumping or apply a force downhill. To deter$$anonymous$$e the direction of the gravity you could do multiple raycasts from the players feet downward and check which point is lowest.

avatar image
0

Answer by toromano · Oct 23, 2015 at 02:22 PM

You need to create physics joints for arms legs fingers and drive them, really complicated though. There is a ragdol tutorial in unity: https://www.youtube.com/watch?v=Hw1UK85sARc

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.

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

2D 360 degress platformer example needed 0 Answers

Two Bone IK constraint with more than 2 bones on my arm. 0 Answers

Collider IsTrigger won't work correctly with close second Collider 0 Answers

Is it possible to get rope physics? 1 Answer

How to make Rigidbody.AddForce less delayed in Unity3D? 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