IssueRaiser

Bring Tween Node back and Merge it with current Tween

### Describe the project you are working on ![We want the Tween Node back flyer](https://pbs.twimg.com/media/F7C1Z3bX0AEHs7O?format=jpg&name=900x900) I'm working on a Multiplayer Online Adventure game implementing interpolation techniques for lag compensation. ### Describe the problem or limitation you are having in your project The current Tween is way more intricate compared to the previous approach and brings up unnecessary steps to achieve things previously trivial, such as accessing and stopping the Tween. For instance, this doesn't work as it doesn't create a tweener for some reason: ```gdscript @onready var tween = create_tween() func interpolate_position(target_position, duration_in_seconds): var interpolation = lerp(previous_position, target_position, 1.0) tween.set_process_mode(Tween.TWEEN_PROCESS_PHYSICS) var tweener = tween.tween_property(spaceship, "position", interpolation, duration_in_seconds) tweener.from(previous_position) previous_position = target_position ``` But this works: ```gdscript func interpolate_position(target_position, duration_in_seconds): var tween = create_tween() var interpolation = lerp(previous_position, target_position, 1.0) tween.set_process_mode(Tween.TWEEN_PROCESS_PHYSICS) var tweener = tween.tween_property(spaceship, "position", interpolation, duration_in_seconds) tweener.from(previous_position) previous_position = target_position ``` And since the tween reference "only exists" wh

Posted by henriiquecampos on Sep 27, 2023, 3:10 PM

Tags

Related issues

Raise real-world problems, find people facing the same issue, and discuss solutions.2,000 issues0 comments

github (Other)

Bring Tween Node back and Merge it with current Tween

henriiquecamposSep 27, 2023, 3:10 PM

### Describe the project you are working on ![We want the Tween Node back flyer](https://pbs.twimg.com/media/F7C1Z3bX0AEHs7O?format=jpg&name=900x900) I'm working on a Multiplayer Online Adventure game implementing interpolation techniques for lag compensation. ### Describe the problem or limitation you are having in your project The current Tween is way more intricate compared to the previous approach and brings up unnecessary steps to achieve things previously trivial, such as accessing and stopping the Tween. For instance, this doesn't work as it doesn't create a tweener for some reason: ```gdscript @onready var tween = create_tween() func interpolate_position(target_position, duration_in_seconds): var interpolation = lerp(previous_position, target_position, 1.0) tween.set_process_mode(Tween.TWEEN_PROCESS_PHYSICS) var tweener = tween.tween_property(spaceship, "position", interpolation, duration_in_seconds) tweener.from(previous_position) previous_position = target_position ``` But this works: ```gdscript func interpolate_position(target_position, duration_in_seconds): var tween = create_tween() var interpolation = lerp(previous_position, target_position, 1.0) tween.set_process_mode(Tween.TWEEN_PROCESS_PHYSICS) var tweener = tween.tween_property(spaceship, "position", interpolation, duration_in_seconds) tweener.from(previous_position) previous_position = target_position ``` And since the tween reference "only exists" wh

Comments (0)

No comments yet. Start the discussion.

Comment on this issue