++
This commit is contained in:
parent
93aa46f863
commit
8244b1e090
1 changed files with 13 additions and 17 deletions
|
|
@ -27,8 +27,6 @@ var bound_offset = Vector2()
|
||||||
|
|
||||||
var state = STATE.WALKING
|
var state = STATE.WALKING
|
||||||
|
|
||||||
var _oldtf = Transform()
|
|
||||||
|
|
||||||
# Called when the node enters the scene tree for the first time.
|
# Called when the node enters the scene tree for the first time.
|
||||||
func _ready():
|
func _ready():
|
||||||
Input.set_mouse_mode(Input.MOUSE_MODE_CAPTURED)
|
Input.set_mouse_mode(Input.MOUSE_MODE_CAPTURED)
|
||||||
|
|
@ -102,10 +100,8 @@ func _integrate_forces(physics_state):
|
||||||
physics_state.add_central_force(acc * mass)
|
physics_state.add_central_force(acc * mass)
|
||||||
|
|
||||||
# emit signal - playerinfo_updated
|
# emit signal - playerinfo_updated
|
||||||
var tf = $Head/Camera.get_global_transform_interpolated()
|
Events.emit_signal("player_transform_updated", $Head/Camera.get_global_translation(), $Head.global_rotation.y)
|
||||||
if tf != _oldtf:
|
|
||||||
Events.emit_signal("player_transform_updated", $Head/Camera.get_global_translation(), $Head.global_rotation.y)
|
|
||||||
_oldtf = tf
|
|
||||||
|
|
||||||
|
|
||||||
func swap_state():
|
func swap_state():
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue