• 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

Mathf.clamp

Cancel

Cancel

All Questions

  • Unanswered Questions
avatar image

impisus_unity edited

How do I limit the roll of a game object?

Dec 7, '20 in Help Room

0 Replies

0 Votes

avatar image

DevMerlin commented

Can rotation be clamped when X produces -30 for both negative and positive?

Sep 14, '17 rotation·transform·mathf.clamp

1 Reply

0 Votes

avatar image

cjtouhey edited

My accelerate script ramps up in the inspector but no movement.

Jun 14, '18 movement·rigidbody·velocity·mathf.clamp

0 Replies

0 Votes

avatar image

mathacka commented

So I'm trying to rotate an object from -35 degrees to 35 degrees, or rather 325 degrees to 35 degrees

Nov 18, '17 in Help Room

1 Reply

0 Votes

avatar image

arksenu published

Mathf.Clamp Squishes Textures Closed

Mar 18, '16 gameobject·texture·mathf.clamp

0 Replies

0 Votes

avatar image

egonspengler_84 asked

Trouble with using Mathf.Clamp function in order to create collision detection with raycasts

May 25, '21 raycast·collision2d·bounds·mathf.clamp

0 Replies

0 Votes

avatar image

goutham12 answered

How do I clamp the y rotation of roty

Jul 8, '16 in Help Room

1 Reply

0 Votes

avatar image

LinkUpGames asked

Help with Clamping X Rotation

Apr 9, '18 c#·rotatearound·mathf.clamp

0 Replies

0 Votes

avatar image

darkdoom973 published

After adding script for rotation to look up down, look left right stopped working,After writing code for the rotation for looking up down, looking right left stopped

Nov 2, '21 rotation·scripting problem·input·charactercontroller·mathf.clamp

0 Replies

0 Votes

avatar image

RobbyT15 commented

How do I allow my player object to continue rotating once it's met a clamped boundary?

May 16, '16 in Help Room

1 Reply

0 Votes

avatar image

RiotRews answered

Hey! I have problem with my FPS controller, where Mathf.Clamp doesn't work. Any ideas?

Jun 15, '17 in Help Room

1 Reply

0 Votes

avatar image

myojin08 edited

how is mathf.clamp to be resolution independent according to the RectTransform rt which is my gamefield? bacause when im playing in other resolution clamp is changing.

Aug 1, '17 in Help Room

0 Replies

0 Votes

avatar image

Captain_Pineapple answered

Limit Rotation of Camera around a player using keyboard Closed

Jan 22, '22 camera·rotation·quaternion·offset·mathf.clamp

1 Reply

0 Votes

avatar image

Fingerlights answered

MathF.Clamp Only Limiting how low my number can go, but not how high, help?

Apr 9, '16 in Help Room

1 Reply

0 Votes

avatar image

Shindy117 asked

Mathf.clamp cancels my trigger

Jun 4, '17 in Help Room

0 Replies

0 Votes

avatar image

Bunny83 answered

Mathf.Clamp not functioning

May 11, '20 math·mathf.clamp

1 Reply

0 Votes

avatar image

ricolini asked

How to make Objects moving on a circular path collide with each other?

Feb 10, '21 in Help Room

0 Replies

0 Votes

avatar image

Cryno1000 asked

Chambering new round script not working

Jun 20, '20 scripting problem·script error·mathf.clamp

0 Replies

0 Votes

avatar image

NoYouSirName commented

Camera moving in both x and y directions when it should only move in y direction Closed

Apr 10, '22 camera·unity 2d·mathf.clamp

0 Replies

0 Votes

avatar image

Graephen asked

How can I make my turret also rotate on the X-axis?

May 9, '22 in Help Room

0 Replies

0 Votes

avatar image

_-puppytails-_ commented

Camera not clamping Closed

May 13, '20 mathf.clamp

0 Replies

0 Votes

avatar image

Privvet asked

Why does the gameobject "bounce back", and start rotating the opposite direction once it has reached its mathf.clamp rotation limit?

May 24, '21 in Help Room

0 Replies

0 Votes

  • »
  • ‹
  • 2
  • 3
  • 4
  • 5
  • 6

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.

Related Topics

rotation c# clamp camera mathf movement quaternion rigidbody boundary scripting problem limit mathf.lerp 2d vector3 eulerangles transform.position transform axis unity 5 camera rotate math gameobject clamped rotation transform.rotation transform.rotate


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