The Godot Q&A is currently undergoing maintenance!

Your ability to ask and answer questions is temporarily disabled. You can browse existing threads in read-only mode.

We are working on bringing this community platform back to its full functionality, stay tuned for updates. | Twitter

+1 vote

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

Godot version 3.4.0
in Engine by (57 points)

1 Answer

+1 vote
Best answer

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
e.g .var yourTween node = get_node("Tween") if the "Tween" is a child of the node that has this script attached
then you useyourTweenNode.interpolateProperty( ... ) to prepare the tween and yourTweenNode.start() to start it.

by (1,346 points)
selected by

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)

Welcome to Godot Engine Q&A, where you can ask questions and receive answers from other members of the community.

Please make sure to read Frequently asked questions and How to use this Q&A? before posting your first questions.
Social login is currently unavailable. If you've previously logged in with a Facebook or GitHub account, use the I forgot my password link in the login box to set a password for your account. If you still can't access your account, send an email to [email protected] with your username.