Weapon Swaying 3D

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By Star Frog

I am currently working on an fps. I would now like to make a weapon swaying. I don’t know how to do it. I found this:

I probably need the parameters of the spatial or the camera attached to it. The player is FPV.

Is there a function that gives the number of degrees when the player (spatial) looks up and down and left and right?

:bust_in_silhouette: Reply From: huhund

Can you make a weapon with animation and attach that to the camera node in the scene? That would create a weapon sway for a first person shooter, correct?

Yes that’s true. However, I want a more specific weapon swaying. When I turn left, I want the gun to pull slightly. Do you understand what I mean?

I would like to do this with “linear_inpolate”, as explained on this website (2D): Interpolation — Godot Engine (3.2) documentation in English

Star Frog | 2020-04-08 14:43