Smooth FPS gun on camera rotate

Hi all, this is my first post, and I have a little problem. :?

I’m making a first person shooter only for study, and I have a capsule (body), a camera, and the gun.

I’m using only scripts made by me (javascripts), based on rigid body.
and I wanna make the gun follow the camera rotation (X and Y) smoothly, like on the counter-strike source, or call of duty… how can I do this?

Thanks :roll: and sorry my bad english :sweat_smile:

Try using Transform.Lookat() on the transform his arms are parented to.

I tryed but stay lagged O.o

how can it be smooth?

thanks