Think this may be useful

The following GDScript could be placed in a game to make a class which lets you exponentially tween in or out any Node3D, just thought it may be useful to some:

func tween_in_expo(thing: Node3D, time: float) -> Tween:
	if not thing:
		return null
	var tween = thing.create_tween()
	var defsize: Vector3 = thing.scale
	tween.set_trans(Tween.TRANS_EXPO)
	tween.set_ease(Tween.EASE_OUT)
	thing.scale = Vector3.ZERO
	tween.tween_property(thing, "scale", defsize, time)
	return tween

func tween_out_expo(thing: Node3D, time: float) -> Tween:
	if not thing:
		return null
	var tween = thing.create_tween()
	tween.set_trans(Tween.TRANS_EXPO)
	tween.set_ease(Tween.EASE_OUT)
	tween.tween_property(thing, "scale", Vector3.ZERO, time)
	return tween

you use it via:

var tweeninandout = tween_in_and_out.new()
tweeninandout.tween_in_expo($Node3D, float(time))
tweeninandout.tween_out_expo($Node3D, float(time))
4 Likes

To clarify, this is Open source code, feel free to use it wherever, but I would enjoy if you credited me

3 Likes

*the updates are for improvements to the code

This asset has been added to the Elementum project; get it directly into your editor by installing the Elementum III plugin!