diff --git a/scenes/DamagedHelmet.evsc b/scenes/DamagedHelmet.evsc index c414a01..20d22c9 100644 --- a/scenes/DamagedHelmet.evsc +++ b/scenes/DamagedHelmet.evsc @@ -32,8 +32,8 @@ 0 ], "rotation": [ - -179.999991348578, - -0, + -180, + 180, 0 ], "scale": [ @@ -43,6 +43,11 @@ ], "type": "TransformComponent" }, + { + "type": "ScriptComponent", + "script_name": "RotationHelper", + "script_path": "scripts://MainScene/objectRotation.lua" + }, { "material": "Material_MR", "mesh": "assets://meshes/DamagedHelmet_mesh_helmet_LP_13930damagedHelmet.mesh", @@ -51,6 +56,66 @@ ], "id": "node_damagedHelmet_-6514" }, + { + "components": [ + { + "position": [ -2, 1, 2], + "rotation": [-180, 0, 0], + "scale": [ 1, 1, 1], + "type": "TransformComponent" + }, + { + "color": [1.0, 1.0, 1.0, 1.0], + "intensity": 200, + "type": "LightComponent" + }, + ] + }, + { + "components": [ + { + "position": [ 2, 1, 2], + "rotation": [-180, 0, 0], + "scale": [ 1, 1, 1], + "type": "TransformComponent" + }, + { + "color": [1.0, 1.0, 1.0, 1.0], + "intensity": 200, + "type": "LightComponent" + }, + ] + }, + { + "components": [ + { + "position": [ 2, 1, -2], + "rotation": [-180, 0, 0], + "scale": [ 1, 1, 1], + "type": "TransformComponent" + }, + { + "color": [1.0, 1.0, 1.0, 1.0], + "intensity": 200, + "type": "LightComponent" + }, + ] + }, + { + "components": [ + { + "position": [ -2, 1, -2], + "rotation": [-180, 0, 0], + "scale": [ 1, 1, 1], + "type": "TransformComponent" + }, + { + "color": [1.0, 1.0, 1.0, 1.0], + "intensity": 200, + "type": "LightComponent" + }, + ] + }, { "id": "Camera", "components": [ @@ -60,11 +125,6 @@ "rotation": [0.0, 0.0, 0.0], "scale": [1.0, 1.0, 1.0] }, - { - "color": [1.0, 1.0, 1.0, 1.0], - "intensity": 100, - "type": "LightComponent" - }, { "type": "ScriptComponent", "script_name": "MainCameraController", diff --git a/scripts/MainScene/objectRotation.lua b/scripts/MainScene/objectRotation.lua new file mode 100644 index 0000000..52489bd --- /dev/null +++ b/scripts/MainScene/objectRotation.lua @@ -0,0 +1,9 @@ +this.on_init = function() + this.angles = Vec3:new() +end + +this.on_update = function() + rotationSpeed = 0.001 + this.angles.y = this.angles.y - rotationSpeed + this.eulerAngles = this.angles +end