From 2e7c27e3934fd9c73f7e6cd414a50a9a17e1669c Mon Sep 17 00:00:00 2001 From: realtradam Date: Thu, 19 Mar 2020 03:06:35 -0400 Subject: Wheels have been made more modular and easier to modify properties --- Racing-Game/4WheelCar/Wheel.gd | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) (limited to 'Racing-Game/4WheelCar/Wheel.gd') diff --git a/Racing-Game/4WheelCar/Wheel.gd b/Racing-Game/4WheelCar/Wheel.gd index 7d36cd8..88ab9b1 100644 --- a/Racing-Game/4WheelCar/Wheel.gd +++ b/Racing-Game/4WheelCar/Wheel.gd @@ -23,10 +23,21 @@ func _ready(): # Called every frame. 'delta' is the elapsed time since the previous frame. func _process(_delta): pass - - - +func initVars(dataArray): +# #---Creating and attaching pinjoint to wheel + var tempA = PinJoint2D.new() + tempA.set_position(Vector2(dataArray[0],dataArray[1])) +# var tempB = Sprite.new() + print(get_parent().get_parent().get_path()) + tempA.set_node_a(get_path()) + tempA.set_node_b(get_parent().get_parent().get_path()) + tempA.softness = 0 + tempA.bias = 0 + tempA.disable_collision = true + get_parent().add_child(tempA) +# #--- + pass func null_slide(var strength, var delta): #strength is how strong you would like the nullify to be -- cgit v1.2.3