Linked Questions

0 votes
1 answer
132 views

Rotation Problem in Mario galaxy like controller [duplicate]

i'm doing a Mario galaxy like CCC. And I have a serious rotation problem, may be Gimble lock, or maybe not. So first, I have a parent object ("PLAYER") who can rotate toward a planet: https://youtu....
Ugo Hed's user avatar
  • 281
0 votes
0 answers
27 views

Rotating with a preferred direction [duplicate]

I do a RayCast to the terrain and then use the RaycastHit.normal to plant flags. I would like to have the flags to point up with the normal, but have them all face the same direction. As seen in the ...
Charl Cillie's user avatar
26 votes
2 answers
6k views

Using Quaternions: What can I do with them? (without the maths)

I am a Game Developer and did not study Mathematics. So I only want to use Quaternions as a tool. And to be able to work with 3D rotation, it's necessary to use Quaternions (Or Matrixes, but let's ...
OC_RaizW's user avatar
  • 1,450
1 vote
2 answers
4k views

Lookrotation of a gameObject in just one axis

So I am trying to orient a gameObject ( house in the picture below) which is nothing but a plane and has a 2d texture on it as you see below. The whole game is made on a hex sphere. I am using ...
ckzilla's user avatar
  • 425
0 votes
1 answer
2k views

Rotate Rigidbody to face away from camera with AddTorque

I have a camera that rotates around an object with "Look At" . I want the object to rotate to face the direction the camera is pointing (Camera.main.transform.forward) using AddTorque, but I can't ...
Daniele Pappalardo's user avatar
0 votes
1 answer
1k views

How to set transform.up without locking the y-axis?

I'm trying to make an object's transform.up to a normal of the raycastHit point. I tried using this line of code: ...
Shromi's user avatar
  • 115
0 votes
0 answers
1k views

How do I determine the forward/right direction when I have the "up" vector? - Unity

I am trying to fix a gameobject for e.g. a cube (which i am using as a sensor) on my character. I need the cube to rotate (with orientation control from the inspector - I have a public quaternion ...
poojiiee's user avatar
0 votes
2 answers
632 views

Rotating only 2 axes of rotation quaternion to "point" in a direction

Note: I am using the Unity DOTS ECS framework, which contains less maths functions, but I can probably implement the same functions from standard unity if the code is public. This question is not ...
Kyohei Kaneko's user avatar
0 votes
1 answer
1k views

Manually update rotation of only Y-axis on Agent

I have some code to manage to rotation of my Navmesh agents: ...
Majs's user avatar
  • 405
0 votes
1 answer
411 views

Make object follow another object like a dog sled

I'm trying to achieve the effect of a dog sled for a small prototype. All my attempts failed until now. I have the following code (inspired from this) ...
Disco Fever's user avatar
0 votes
1 answer
391 views

Character rotation jitters when looking around

I want my character to walk around sphere like a planet, so in my script I rotate it according to the normal of a raycast and I also rotate my character on the Y axis when I look around with the mouse....
Samuel Fyckes's user avatar
0 votes
1 answer
200 views

How to rotate the transform only on the Y?

...
Daniel Lip's user avatar
  • 1,747
0 votes
1 answer
178 views

How to rotate a player to orient their up with a landing normal?

I'm making a skateboarding prototype in Unity, and like in skate 3, I'd like the player to sort of "align" gradually to their predicted landing slope. I've written the code that gets the ...
LeytonMate's user avatar