added scene lights and helment rotation
This commit is contained in:
@@ -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",
|
||||
|
||||
@@ -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
|
||||
Reference in New Issue
Block a user