Minor Changes
Signed-off-by: Robear Selwans <robear.selwans@outlook.com>
This commit is contained in:
@@ -9,18 +9,17 @@ this.on_update = function()
|
||||
local deltaMouseMovement = Input.getDeltaMousePos()
|
||||
this.angles.y = this.angles.y - deltaMouseMovement.x * this.mouse_sens
|
||||
this.eulerAngles = this.angles
|
||||
end
|
||||
print('Camera OnUpdate')
|
||||
|
||||
this.on_fixedupdate = function()
|
||||
if Input.getKeyJustPressed(Input.KeyCode.Enter) then
|
||||
gotoScene('SideScene')
|
||||
end
|
||||
|
||||
if Input.getKeyDown(Input.KeyCode.Up) then
|
||||
this.position = this.position + Vec3:new(0, 1, 0) * this.speed
|
||||
this.position = this.position + this:getChild('RotationHelper').forward * this.speed
|
||||
end
|
||||
if Input.getKeyDown(Input.KeyCode.Down) then
|
||||
this.position = this.position - Vec3:new(0, 1, 0) * this.speed
|
||||
this.position = this.position - this:getChild('RotationHelper').forward * this.speed
|
||||
end
|
||||
if Input.getKeyDown(Input.KeyCode.Right) then
|
||||
this.position = this.position + Vec3:new(1, 0, 0) * this.speed
|
||||
|
||||
@@ -7,4 +7,5 @@ this.on_update = function()
|
||||
local deltaMouseMovement = Input.getDeltaMousePos()
|
||||
this.angles.x = this.angles.x - deltaMouseMovement.y * this.mouse_sens
|
||||
this.eulerAngles = this.angles
|
||||
print('CameraHelper OnUpdate')
|
||||
end
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
-- other.position = other.position + Vec3:new(3.2, 0, 0)
|
||||
-- end
|
||||
this.on_init = function()
|
||||
print(this:getChild('Child').position:to_string())
|
||||
-- print(this:getChild('Child').position:to_string())
|
||||
end
|
||||
|
||||
this.on_update = function ()
|
||||
|
||||
@@ -35,5 +35,6 @@ void main() {
|
||||
Vertex vertex = ResourceBuffers[ nonuniformEXT(0) ].resources[PositionBuffers[ nonuniformEXT(0) ].resources[gl_VertexIndex] ];
|
||||
|
||||
normal = vertex.normal.xyz;
|
||||
gl_Position = vec4(vertex.position.x, vertex.position.y, vertex.position.z, 1.0);
|
||||
float scale = 0.3;
|
||||
gl_Position = vec4(vertex.position.x * scale - 0.1, vertex.position.y * scale - 0.7, (vertex.position.z * scale * -1.0 + 0.9), 1.0);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user