Multiple Demo Changes
Signed-off-by: Robear Selwans <robear.selwans@outlook.com>
This commit is contained in:
@@ -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
|
||||
Reference in New Issue
Block a user