Changed the rotations in loading screen and ingame. First implementation for rolly tolly toy.
This commit is contained in:
1 parent
00ac3cb984
commit
ba8689916b
4 files changed
+18
-8
No files matched your search
@@ -1,14 +1,20 @@
|
||||
extends Spatial
|
||||
extends RigidBody
|
||||
class_name BodyBase
|
||||
|
||||
|
||||
export(int) var player_id
|
||||
var ingame : bool = false
|
||||
var ground : Spatial
|
||||
var current_angle : float
|
||||
|
||||
|
||||
# Called when the node enters the scene tree for the first time.
|
||||
func _ready():
|
||||
pass # Replace with function body.
|
||||
func on_ingame():
|
||||
ground = get_parent().get_node("Arena").get_node("ground")
|
||||
ingame = true
|
||||
|
||||
|
||||
# Called every frame. 'delta' is the elapsed time since the previous frame.
|
||||
#func _process(delta):
|
||||
# pass
|
||||
func _process(delta):
|
||||
if ingame:
|
||||
current_angle = translation.angle_to(ground.translation)
|
||||
print(current_angle)
|
||||
@@ -11,6 +11,7 @@ height = 1.48749
|
||||
[node name="Torso" type="RigidBody" groups=[
|
||||
"Player",
|
||||
]]
|
||||
transform = Transform( 1, 0, 0, 0, -1.62921e-07, -1, 0, 1, -1.62921e-07, 0, 0, 0 )
|
||||
script = ExtResource( 1 )
|
||||
|
||||
[node name="TorsoCollider" type="CollisionShape" parent="."]
|
||||
|
||||
Reference in new issue
Block a user