Multiple Demo Changes

Signed-off-by: Robear Selwans <robear.selwans@outlook.com>
This commit is contained in:
2021-07-25 10:48:35 +02:00
parent f9018c9878
commit 7e25e7198d
13 changed files with 1009 additions and 33 deletions
+11
View File
@@ -0,0 +1,11 @@
this.shootForce = 600
this.on_update = function()
if Input.getKeyJustPressed(Input.KeyCode.P) then
spawn = loadPrefab('prefabs://DamagedHelmet.pf')
spawn.position = this.worldPosition
rb = spawn:getComponent(Rigidbody)
rb:addForce(Vec3:new(-1, -2, 1) * this.shootForce)
end
end