New answers tagged

1 vote
Accepted

Rotating dials with increments, one works and the others doesn't. Why?

The problem is that each Rotate2d has its own independent life cycle, which means that Update will be executed 4 times per frame....
user avatar
  • 1,091
1 vote
Accepted

How can I rotate my BoxCollider2D 360 degrees around other colliders while maintaining a constant forward direction?

Vector2.Angle: Note: The angle returned will always be between 0 and 180 degrees, because the method returns the smallest angle between the vectors. Maybe you need Vector2.SignedAngle: Note: The ...
user avatar
  • 1,091
1 vote

Why does the player rotate nonstop?

My usual solution to this problem is: Introduce a new variable Quaternion desiredRotation which represents the direction where the object should look but might or ...
user avatar
  • 112k
0 votes

How can I move and rotate an object along with another using vector math?

Oxy is correct that parenting is the easy way. And, yes, I'm aware I'm answering years later. Yet, if that is not convinient, we can still do this. The ...
user avatar
  • 18.4k
1 vote
Accepted

How to make an object move and rotate the same amount as another obejct

If I understand correctly, you have two copies of your spaceship, one that is a moving Rigidbody and one that is stationary. You want the player to walk around the stationary ship, while the camera ...
user avatar
  • 3,495
1 vote
Accepted

A point on a sphere surface needs to be converted to origin coordinate

You're moving your planet with its Transform component, but then detecting hits with its Collider component, which is part of the physics system. This separately tracks the position and orientation of ...
user avatar
  • 113k

Top 50 recent answers are included