|Topic was automatically imported from the old Question2Answer platform.
So here’s what im trying to do:
I made a dash which work but i need some small refinement like switching fov when dashing to give more “lively” feeling
The problem is i don’t know a lot about tween so i just want when i dash my fov goes from camera’s current fov to something much higher
The reason why im using tween is because im planning to add a parameter in my game option which allows you to change your fov
If you select the camera object and look at the inspector and hover your mouse whatever property controls the fov, it’ll tell you the property name that you can use in code.
Then you use need to get a reference to the Tween node that is going to do the tween
var yourTween node = get_node("Tween") if the “Tween” is a child of the node that has this script attached
then you use
yourTweenNode.interpolateProperty( ... ) to prepare the tween and
yourTweenNode.start() to start it.
Thanks i figured it out a while ago i had to do this:
Dash_FOV.interpolateProperty(camera, "fov", FOV, FOV + 3, 0.14)
The FOV is a variable (70) and the 0.14 correspond to the dash duration (because i used a timer node to determine how long my dash will go)
Hexadotz | 2022-02-05 21:01