7e25e7198d
Signed-off-by: Robear Selwans <robear.selwans@outlook.com>
12 lines
300 B
Lua
12 lines
300 B
Lua
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
|