Basic 3d Disc
This commit is contained in:
17
3d_test.gd
Normal file
17
3d_test.gd
Normal file
@@ -0,0 +1,17 @@
|
||||
extends Node3D
|
||||
|
||||
const Disc = preload("res://disc.tscn")
|
||||
|
||||
# Called when the node enters the scene tree for the first time.
|
||||
func _ready():
|
||||
pass # Replace with function body.
|
||||
|
||||
func _input(event):
|
||||
if event.is_action_pressed("player_jump"):
|
||||
var disc = Disc.instantiate()
|
||||
disc.position = $Player/Torso/RightArm/Hand.global_position
|
||||
add_child(disc)
|
||||
disc.apply_impulse(Vector3(0,10,0))
|
||||
# Called every frame. 'delta' is the elapsed time since the previous frame.
|
||||
func _process(delta):
|
||||
pass
|
||||
Reference in New Issue
Block a user