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 game_crusher · Jun 11, 2015 at 10:36 AM · unity 5physicsfps controller

FPS Controller can jump over anything

Hi, No matter how steep a surface is my FPS Controller(unity 5.0.2) can jump over it.I have mountains who surrounds my map and some of them make almost 90 degrees with the ground.No problem for my olympic champion at jumping/climbing who makes it over them and out off the map.If i understood correctly from unity manual this setting is the "Slope Limit", but there they recommend a 90 degrees value, while the default setting is 45.Either way, except perfectly perpendicular walls, my FPS Controller can jump/climb over anything.How do i correct this behavior?Thanks!

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 cgeopapa · Jun 12, 2015 at 10:00 AM 1
Share

Since you have a terrain you should degrese you slope limit to a value that works best for you. I also have terrain and I have my slope limit to 25. At the unity manual I bet that what they have in $$anonymous$$d is buildings and stuff like that and not terrains.

avatar image game_crusher · Jun 12, 2015 at 12:20 PM 0
Share

Thanks cgeopapa,but apparently this is not it.Whatever value i put in slope limit(i tried 25, 10, 5, 0) it doesn't work.By repeatedly pressing "space" i can get in the top of any mountain.$$anonymous$$aybe there is another parameter that i should modify?

avatar image cgeopapa · Jun 12, 2015 at 12:26 PM 0
Share

Oh, to overcome this issue you can add some colliders to the places that shouldnt be accessible! They dont have to be 100% acurate, just enough so that the player cant get out of the map. An other option is to make a script but I really dont know how you can do this.

avatar image FerociousIndustries · May 22, 2019 at 08:58 PM 0
Share

I'd like to mention sometimes it works on the character controller to add a physics material to its collider, with 0 friction, and the same on the wall colliders

3 Replies

· Add your reply
  • Sort: 
avatar image
0

Answer by nathanwick · Sep 02, 2017 at 06:57 PM

i have the same problem

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 FerociousIndustries · May 22, 2019 at 08:57 PM

Hi guys im facing this issue as well. FPS zombie survival, player can escape any room by jumping. Not cool, someone please help

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 Cornelis-de-Jager · May 22, 2019 at 09:16 PM

Method 1

Assign a maximum slop against which jumping is valid.

 float maxSlope = 45;// Max angle allowed to jump from - Note this angle will be a inverse: 90 - this angle is the actual angle

 public bool CheckJumpAngle () {
     
     Ray ray = new Ray(transform.position, -transform.up);
     
     RaycastHit hit;
     
     if (Physics.Raycast(Ray, out hit)){
         // Return the angle between transform.up and normal
         float angle = 90 - Vector3.Angle(transform.up, hit.normal);
         
         if (angle < maxSlope)
             return true;
     }
     
     return false;
 }

    // Example implementation
 void Jump () {
     if (CheckJumpAngle() && TouchingGround() && ...)
         DoJumpPhysics();
 }


Method 2

Play around with adding physics materials to your player. Specifically the friction property. This will allow the play to start sliding onces the slope gets to steep and is relatively easy to implement.

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

6 People are following this question.

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

Related Questions

Gravity still being applied with unity CharacterController 0 Answers

WheelCollider - I don't have a circle of Collider 1 Answer

Affecting FPS controller/Character Motor physics with game object 1 Answer

NonKinematic Rigidbody moved with Rigidbody.MovePosition not interacting with other NonKinematic Rigidbody as expected. 0 Answers

Unity 5 physics change from Unity 4 help! 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