How to add some small details to my game such as aim blending

Im making a fps game and i cant figure out a way to make it so when the player aims the gun doesent instantly snap to the aim position but it kind of makes it there in like 0.5 seconds and the camera fov snaps but i want it to like zoom in 0.5 seconds

Hi @Granted,

What you are looking for is lerp, given a current and target position that method can be used to slowly make the two positions converge:

https://developer.playcanvas.com/api/pc.Vec3.html#lerp

It’s been used in several examples, here is one:
https://developer.playcanvas.com/en/tutorials/point-and-click-movement/