godot-xr-tools icon indicating copy to clipboard operation
godot-xr-tools copied to clipboard

XRToolsInteractableAreaButton animation ignore node process mode and is always pausable

Open GaelFG-Anderon opened this issue 7 months ago • 0 comments

I use XRToolsInteractableAreaButton on my pause menu and it occured XRToolsInteractableAreaButton don't animate if the scene tree is paused even if the node process mode is set to always.

It's because the animation tweens are created with

	# Construct the button animation tween
	_tween = get_tree().create_tween()
	_tween.set_trans(Tween.TRANS_LINEAR)
	_tween.set_ease(Tween.EASE_IN_OUT)
	_tween.tween_property(_button, "position", _button_down, duration)

I corrected it by adding :

 _tween.bind_node(self)
_tween.set_pause_mode(Tween.TWEEN_PAUSE_BOUND)

in the animation code on the two places before the call to "tween_property".

I'm not sure it doesn't have unseen side effect or if it is desirable for everyone, but I can submit a pull request with the change if desired.

GaelFG-Anderon avatar Jul 12 '24 15:07 GaelFG-Anderon