camera update
This commit is contained in:
@@ -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))
|
||||
|
||||
|
||||
Reference in New Issue
Block a user