Hello
I have an issue with synchronizing the Y-axis on the weapon in an FPS im working on.
What happens when i try to synchronize the position of the weapon is that half of the frames you will see the gun in its intended position, but when you stop moving the gun, the position gets reset to its original position.
My gameobject Hiearchy is set up like this:
root(the base mesh, the character)
|-Camera with a mouselook
|-Gameobject with a mouselook
|-My gun
I have a networkview on the gameobject and the Root, to synchronize the movement, but with this setup i get the bug i described above.
I have tried the same setup, with a slight change:
root(the base mesh, the character)
|-Camera with a mouselook
|-Gameobject without a mouselook, still with the network view though
|-My gun
what i did in this setup was to attack a script to the camera with these lines of code in it:
public GameObject objects;
void Update () {
objects.transform.rotation = transform.rotation;
}
the issue i got with this method was some extremely choppy movement and lag between the gun and the Camera. the position of the Gun did get synchronized without any issues though.
Lastly i tried to have the gun as a child to the camera, which didnt work because all cameras but your own is disabled, which means that the rotation of the camera isnt synchronized.
So please help me out here, im more or less at my wits end, only thing i havnt tried yet, which i know of, is black magic.
Thanks in Advance
-Kacer