mirror of
https://github.com/stan220/godot-docs.git
synced 2026-09-08 18:29:11 +00:00
Merge pull request #2413 from clayjohn/fish_position_typo
Fixes position typo in fish tutorial
This commit is contained in:
@@ -92,16 +92,16 @@ Then, use those seeds to generate random numbers using ``rand_from_seed``:
|
||||
.. code-block:: glsl
|
||||
|
||||
CUSTOM.x = rand_from_seed(alt_seed1);
|
||||
vec3 position = vec3(rand_from_seed(alt_seed2)*2.0-1.0,
|
||||
rand_from_seed(alt_seed3)*2.0-1.0,
|
||||
rand_from_seed(alt_seed4)*2.0-1.0);
|
||||
vec3 position = vec3(rand_from_seed(alt_seed2) * 2.0 - 1.0,
|
||||
rand_from_seed(alt_seed3) * 2.0 - 1.0,
|
||||
rand_from_seed(alt_seed4) * 2.0 - 1.0);
|
||||
|
||||
Finally, assign ``position`` to ``TRANSFORM[3].xyz``, which is the part of the transform that holds
|
||||
the position information.
|
||||
|
||||
.. code-block:: glsl
|
||||
|
||||
TRANSFORM[3].xyz = CUSTOM.xyz*20.0;
|
||||
TRANSFORM[3].xyz = position * 20.0;
|
||||
|
||||
Remember, all this code so far goes inside the ``RESTART`` block.
|
||||
|
||||
|
||||
Reference in New Issue
Block a user