Login

Fancade Wiki

move image to relevant block

... ...
@@ -1,19 +1,21 @@
1
Create a rotation pointing in a given direction, e.g. rotating a character to look that way.
2
3 1
[[/uploads/Look Rotation.png|width=336px,alt=Look Rotation]]
4 2
3
Create a rotation pointing in a given direction, e.g. rotating a character to look that way.
4
5 5
Inputs:
6 6
* Direction: The direction you want to look in
7
* Up: Which way is up for the looking character (defaults to 0,1,0 if unwired)
7
* Up: Which way is up for the looking character (defaults to [0, 1, 0] if unwired)
8 8
9 9
Outputs:
10 10
* Rotation: A rotation "looking" in the direction.
11 11
12 12
## Notes
13 13
14
* When converting one direction (vector) into a rotation, there is actually an infinite number of solutions! You can visualise this by picking up an object, say a pencil, and point it in some direction. You'll notice that you can still spin the pencil (thus changing it's rotation) without changing the direction it's pointing. That's why we define a second "Up" vector. It helps define how the pencil should be oriented. (It can often be ignored, but is definitely needed if the default 0,1,0 is in the same plane as the Direction input.)
14
* When converting one direction (vector) into a rotation, there is actually an infinite number of solutions! You can visualise this by picking up an object, say a pencil, and point it in some direction. You'll notice that you can still spin the pencil (thus changing it's rotation) without changing the direction it's pointing. That's why we define a second "Up" vector. It helps define how the pencil should be oriented. (It can often be ignored, but is definitely needed if the default [0, 1, 0] is in the same plane as the Direction input.)
15 15
16 16
## Examples
17 17
18
- Make an object point to another object:
19
[[/uploads/Screenshot_2022_1030_155921.png]]
18 20
- [[Angle between two vectors]]
19 21
- Look rotation is also used to created inverse trigonometric functions. See the related script block: [[Break Rotation]]
... ...
\ No newline at end of file
Fancade Wiki