Skip to main content
4 votes
Accepted

Weird behaviors with transform.LookRotation when looking at position+Vector3

Three mistakes: You're reading the controller's velocity before you've fed it the latest input, so this is stale data, adding a frame of latency to your rotation. That accounts for the lag you're ...
DMGregory's user avatar
  • 135k
2 votes
Accepted

Using both look_at and flip_h in Godot

flip_h is making your arm point in the "opposite" direction when you use look_at. A quick, simple solution would be ...
Tanaki's user avatar
  • 252
2 votes
Accepted

How to set world rotation directly in Stride?

In Unity, the .rotation property works something like this... ...
DMGregory's user avatar
  • 135k
1 vote

How to keep an object that rotates around another at the same height when the radius changes?

I would solve this by turning the one GameObject into two with a parent-child relationship. Place the parent on the center of the orbit Use the transform.rotation of the parent to control the ...
Philipp's user avatar
  • 120k
1 vote

How to rotate spaceship quaternion to face target direction with constant angular speed?

I got it. I was nearly there for ages, and flipping the multiplication on the final statement (rotationToApply * orientation, not orientation * rotationToApply) fixed it. Apparently whether you are ...
Tachytaenius's user avatar
1 vote
Accepted

Motion Retargeting from a BVH File to a Rigged Mesh in Unity with Arbitrary Rest Pose

I kinda fixed it myself. Solution is simple: I just hand-tuned all the required twist angles in Unity. There is a hidden problem though: the order of the 'twist' and 'swing' rotation matters. Result ...
Bobo Saint's user avatar
1 vote

Unity Camera snaps back to camera mouse look after lerping to a point and rotating normally. Once mouse look is re-enabled it overrides and snaps back

I went back and rewrote the script in the mouse look script instead of the FollowLookAt script. It is now working. Here is the script if anyone is trying to do the ...
WestMansionHero's user avatar
1 vote
Accepted

Where is the illusion of a moving camera perspective coming from in this rotatable cube model?

On the camera illusion The camera projection (regardless of it being perspective, orthogonal, or something else) is a transformation or series of transformations. When you move your cube, you move its ...
Theraot's user avatar
  • 27.2k
1 vote
Accepted

Rotating around 3D cube Camera Controller for Unity

I just needed the approach that https://gamedev.stackexchange.com/users/21890/philipp said A rig inside the cube and a focus point inside the rig. and the following code solve this: ...
DamagedCyborg's user avatar
1 vote
Accepted

When to use InverseTransformDirection in Unity

The InverseTransformDirection function is used to convert the target direction from world space to the local space. Which in your code the "turretBase" transform, enabling the correct ...
Bluze Ocean's user avatar
1 vote

How do I prevent camera jitter when rotating the player?

I've had the same problem, and as @natalo77 said in the comments, switching to absolute rotation did the trick. You need to select the parent of your camera (the camera boom), then in the transform, ...
fire frost's user avatar
1 vote

How to rotate 2D arm around shoulder so gun points at cursor?

There's a couple of assumptions to state based on the question + gif posted. We have a static gun+arm that pivots around the player's shoulder You want the arm and gun to rotate around the shoulder, ...
Domo106's user avatar
  • 70
1 vote

Extract a rotation matrix given a camera direction (vector) and a up vector for the camera?

As python code (assumes x to the right and y down in camera space): ...
LC117's user avatar
  • 111

Only top scored, non community-wiki answers of a minimum length are eligible