Make infinite loop more rounded with better rails

soundtrack
Ensar Sarajčić 2021-11-20 18:43:32 +01:00
parent 1850d12fe7
commit 54d9ff1cdd
3 changed files with 4 additions and 4 deletions

View File

@ -33,7 +33,7 @@ func reset_player_to(node_to_reset_to: Node, player_node: BuggedVehicle) -> void
).origin,
node_to_reset_to.global_transform.basis.y
)
player_node.reset_transform.origin += node_to_reset_to.global_transform.basis.y * 5
player_node.reset_transform.origin += node_to_reset_to.global_transform.basis.y * 3
func _process(_delta: float) -> void:

View File

@ -90,7 +90,7 @@ curve = SubResource( 4 )
[node name="Track" type="CSGPolygon" parent="Path" index="0"]
use_collision = true
polygon = PoolVector2Array( -10, -3, -2, -1, 2, 0, 10, 3 )
polygon = PoolVector2Array( -10, -3, -10, 0, -5, -2, -2, -3, 2, -3, 5, -2, 10, 0, 10, -3 )
mode = 2
path_node = NodePath("..")
path_interval_type = 0
@ -105,7 +105,7 @@ material = SubResource( 6 )
[node name="Rails" type="CSGPolygon" parent="Path" index="1"]
use_collision = true
polygon = PoolVector2Array( -10, 3, -12, 3, -12, -3.1, 12, -3.1, 12, 6, 10, 6, 10, 2.9, -10, -3.1 )
polygon = PoolVector2Array( 0, -6, -6, -5, -12, -2, -14, 2, -16, 5, -12, 8, -10, 9, -10, 8, -12, 4, -12, 2, -10, 0, -11, 0, -6, -4, 6, -4, 11, 0, 10, 0, 12, 2, 12, 4, 10, 8, 10, 9, 12, 8, 16, 5, 14, 2, 12, -2, 6, -5 )
mode = 2
path_node = NodePath("..")
path_interval_type = 0

View File

@ -70,9 +70,9 @@ func _ready():
func _integrate_forces(state: PhysicsDirectBodyState) -> void:
if reset_transform != Transform.IDENTITY:
state.set_transform(reset_transform)
state.linear_velocity = Vector3.ZERO
state.angular_velocity = Vector3.ZERO
state.set_transform(reset_transform)
reset_transform = Transform.IDENTITY