feat(*): Split out vehicle object

This commit is contained in:
Josh Creek
2024-02-23 18:12:59 +00:00
parent 5d518cbcfb
commit 0fd3098f14
4 changed files with 59 additions and 35 deletions
+1 -1
View File
@@ -7,7 +7,7 @@ func _physics_process(delta):
if vehicle and ball:
# Adjust the offset based on your scene scale
# Increasing Y component to raise the camera higher above the vehicle
var offset = Vector3(0, 10, 10) # Adjust Y to change height
var offset = Vector3(0, 2, -2) # Adjust Y to change height
# Position the camera behind and above the vehicle
var behind_vehicle = vehicle.global_transform.origin - vehicle.global_transform.basis.z * offset.z
+1
View File
@@ -3,6 +3,7 @@ extends RigidBody3D
var speed = 10.0 # Adjust the speed as necessary
func _integrate_forces(state):
# TODO - change these so they are relative to the vehicle, not the world
var input_vector = Vector3.ZERO
if Input.is_action_pressed("move_forward"):
input_vector.z -= 1