How to get return value from specific method when using tween_method

Godot Version



Hello, can you get method return value if you use tween.tween_method?
iirc in godot 3.5 it was possible, but looking on the godot 4 tween changes it seems its not an option anymore, or?

Example: if you tween method “move_and_collide”, generally getting return value is important(if you dont have specific usage etc…), but if in godot 4 using tween on this method makes it impossible to get return value, then its not usable for general use with “move_and_collide”…

Use a lambda function

	var collision = move_and_collide(...)
	# do whatever with collision
, initial_value, final_value, duration)

1 Like

Thx :slight_smile:

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.