summaryrefslogtreecommitdiffhomepage
path: root/Racing-Game/4WheelCar/Wheel.gd
diff options
context:
space:
mode:
Diffstat (limited to 'Racing-Game/4WheelCar/Wheel.gd')
-rw-r--r--Racing-Game/4WheelCar/Wheel.gd17
1 files changed, 14 insertions, 3 deletions
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