- Home /
Question by
MagisterTerran · Apr 25, 2020 at 04:26 PM ·
rigidbody2deuleranglesrigidbody physics
Rigidbody2D constraints checked for x and y but still moves when character jumps on it from distance
I have a character that jumps on the object on air and as the title says it still moves a little bit.
I have a code to limit z movement :
private void FixedUpdate() {
Vector3 euler = transform.eulerAngles;
if (euler.z > 180) {
euler.z = euler.z - 360;
}
euler.z = Mathf.Clamp(euler.z, -35 , 35);
transform.eulerAngles = euler;
}
I use this code to not turn all the way around for z. but it moves I how can I prevent moving ?
Comment
Your answer
![](https://koobas.hobune.stream/wayback/20220612232439im_/https://answers.unity.com/themes/thub/images/avi.jpg)
Follow this Question
Related Questions
How to instantly accelerate a falling game object to the maximum fall speed? 2 Answers
Kinematic vs. non-kinematic movement over a curve 0 Answers
Rigidbody2D.position and Rigidbody2D.MovePosition() 0 Answers
Help with executing method when object has rotated 360 degrees 0 Answers
How to fix bouncing, jittery effect between two dynamic objects in 2D 1 Answer