camera update

This commit is contained in:
Nikolai Fesenko
2025-08-13 15:03:14 +02:00
parent 37e0aa1a3e
commit 69d384345a
2 changed files with 5 additions and 3 deletions

View File

@@ -8,7 +8,6 @@ var debugLabel
var global_delta
var default_pos
func _ready() -> void:
default_pos = self.position
debugLabel = $DebugLabel1
@@ -16,11 +15,14 @@ func _ready() -> void:
func _process(delta: float) -> void:
global_delta = delta
look_at(ownRigidBody.position)
self.position.y = -0.1 * pow(self.position.z,2) + 40
if(Input.is_action_just_released("move_camera_enable")):
ownRigidBody.angular_velocity = Vector3.ZERO
if(Input.is_action_pressed("move_camera_enable")):
var mouseV = Input.get_last_mouse_velocity()
ownRigidBody.angular_velocity.y = -mouseV.x * delta / camera_speed
ownRigidBody.angular_velocity.y = -mouseV.x * delta / camera_speed
self.position.z += mouseV.y * delta / 10.0
#ownRigidBody.angular_velocity.x = mouseV.y * delta / camera_speed
#print(self.position.dot(ownRigidBody.position))