diff options
| author | realtradam <[email protected]> | 2020-03-19 03:06:35 -0400 |
|---|---|---|
| committer | realtradam <[email protected]> | 2020-03-19 03:06:35 -0400 |
| commit | 2e7c27e3934fd9c73f7e6cd414a50a9a17e1669c (patch) | |
| tree | a326cf8298580e28aa76766ec2836f980257f428 /Racing-Game/4WheelCar/Wheel.gd | |
| parent | 0fe77a326aec5732920dd3b23b36fd3405ff9e25 (diff) | |
| download | optimal-direction-2e7c27e3934fd9c73f7e6cd414a50a9a17e1669c.tar.gz optimal-direction-2e7c27e3934fd9c73f7e6cd414a50a9a17e1669c.zip | |
Wheels have been made more modular and easier to modify properties
Diffstat (limited to 'Racing-Game/4WheelCar/Wheel.gd')
| -rw-r--r-- | Racing-Game/4WheelCar/Wheel.gd | 17 |
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 |
