added scene lights and helment rotation

This commit is contained in:
j3oss
2021-07-20 13:35:29 +02:00
parent bbd9ad05f5
commit b50a22f4bf
2 changed files with 76 additions and 7 deletions
+67 -7
View File
@@ -32,8 +32,8 @@
0 0
], ],
"rotation": [ "rotation": [
-179.999991348578, -180,
-0, 180,
0 0
], ],
"scale": [ "scale": [
@@ -43,6 +43,11 @@
], ],
"type": "TransformComponent" "type": "TransformComponent"
}, },
{
"type": "ScriptComponent",
"script_name": "RotationHelper",
"script_path": "scripts://MainScene/objectRotation.lua"
},
{ {
"material": "Material_MR", "material": "Material_MR",
"mesh": "assets://meshes/DamagedHelmet_mesh_helmet_LP_13930damagedHelmet.mesh", "mesh": "assets://meshes/DamagedHelmet_mesh_helmet_LP_13930damagedHelmet.mesh",
@@ -51,6 +56,66 @@
], ],
"id": "node_damagedHelmet_-6514" "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", "id": "Camera",
"components": [ "components": [
@@ -60,11 +125,6 @@
"rotation": [0.0, 0.0, 0.0], "rotation": [0.0, 0.0, 0.0],
"scale": [1.0, 1.0, 1.0] "scale": [1.0, 1.0, 1.0]
}, },
{
"color": [1.0, 1.0, 1.0, 1.0],
"intensity": 100,
"type": "LightComponent"
},
{ {
"type": "ScriptComponent", "type": "ScriptComponent",
"script_name": "MainCameraController", "script_name": "MainCameraController",
+9
View File
@@ -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