Decorations are now rotating randomly
This commit is contained in:
parent
57c7c23c2a
commit
d6434ee401
|
@ -35,6 +35,8 @@ func generate_decoration_objects():
|
||||||
for i in range(0, maximum_decoration_objects):
|
for i in range(0, maximum_decoration_objects):
|
||||||
var decoration = decorations[TileType.keys()[tile_type]]["object"].instantiate()
|
var decoration = decorations[TileType.keys()[tile_type]]["object"].instantiate()
|
||||||
var pos = Vector3(generate_predictable_random(0, 10, str(i) + "x") - 5, 0, generate_predictable_random(0, 10, str(i) + "z") - 5)
|
var pos = Vector3(generate_predictable_random(0, 10, str(i) + "x") - 5, 0, generate_predictable_random(0, 10, str(i) + "z") - 5)
|
||||||
|
var y_rot = generate_predictable_random(0, 360, str(i) + "rot_y")
|
||||||
|
decoration.rotation.y = y_rot
|
||||||
decoration.position = pos
|
decoration.position = pos
|
||||||
decoration.add_to_group("Decoration")
|
decoration.add_to_group("Decoration")
|
||||||
add_child(decoration)
|
add_child(decoration)
|
||||||
|
|
Loading…
Reference in New Issue