Skip to content

tween_property on a "Basis" property doesn't change its value until the end of the duration #79372

Closed
@timkrief

Description

@timkrief

Godot version

4.1.stable

System information

Ubuntu 22.04

Issue description

When using a Tween with tween_property on a property of class Basis, it doesn't seem to update its value. It only changes at the end of the tweening. This issue wasn't in 3.5 for me, and I found this 3 month old conversation about the issue.

Steps to reproduce

Try to tween a Basis property, or just run the code bellow

Minimal reproduction project

This simple code will print the same values for five seconds and then the final value, the tweening doesn't occur.

extends Node

var basis = Basis(Vector3.RIGHT, Vector3.UP, Vector3.BACK)
var target_basis = Basis(Vector3.LEFT, Vector3.DOWN, Vector3.FORWARD)

func _ready():
	create_tween().tween_property(self, "basis", target_basis, 5.0)

func _process(delta):
	print(basis)

Activity

TokageItLab

TokageItLab commented on Jul 12, 2023

@TokageItLab
Member

I guess it is because the definition of OP_ADD is missing in variant_op.cpp. Probably the same for the Projection type. However, mathematically they are not additive, so perhaps a separate case statement should be implemented for Animation::add_variant().

added this to the 4.2 milestone on Jul 13, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      tween_property on a "Basis" property doesn't change its value until the end of the duration · Issue #79372 · godotengine/godot