Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix tween_property on Basis to properly update its value #79426

Merged
merged 1 commit into from
Jul 14, 2023

Conversation

sepTN
Copy link
Contributor

@sepTN sepTN commented Jul 13, 2023

Fix #79372

extends Node

@onready var lbl1 : Label = $Label
@onready var lbl2 : Label = $Label2

var vector3 = Vector3.ONE
var target_vector3 = Vector3(-1,-1,-1)

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

func _ready() -> void:
	create_tween().tween_property(self, "basis", target_basis, 5.0)
	create_tween().tween_property(self, "vector3", target_vector3, 5.0)

func _process(delta):
	lbl2.text = "Tweening Vector3: " + str(vector3)
	lbl1.text = "Tweening Basis: " + str(basis)

Before

before.mp4

After

after.mp4

@TokageItLab TokageItLab requested a review from KoBeWi July 13, 2023 17:20
@AThousandShips AThousandShips added this to the 4.2 milestone Jul 13, 2023
@YuriSizov YuriSizov added the cherrypick:4.1 Considered for cherry-picking into a future 4.1.x release label Jul 14, 2023
@YuriSizov YuriSizov merged commit 16565fb into godotengine:master Jul 14, 2023
13 checks passed
@YuriSizov
Copy link
Contributor

Thanks!

@YuriSizov YuriSizov removed the cherrypick:4.1 Considered for cherry-picking into a future 4.1.x release label Jul 17, 2023
@YuriSizov
Copy link
Contributor

Cherry-picked for 4.1.1.

@YuriSizov YuriSizov changed the title Fix tween_property on "Basis" to properly update its value Fix tween_property on Basis to properly update its value Jul 17, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

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