Object transform scale changing at different velocities in host and client
The whole answer can be found below.
Try Our
Documentation
Please check if you can find an answer in our extensive documentation on Fusion.
Join Us
on Discord
Meet and talk to our staff and the entire Photon-Community via Discord.
Read More on
Stack Overflow
Find more information on Stack Overflow (for Circle members only).
Object transform scale changing at different velocities in host and client
sabonette
2022-06-04 23:45:55
I have an object that grows in an specific axis, as it follows:
public override void FixedUpdateNetwork() {
if (!_growingTimer.Expired(Runner))
transform.localScale += new Vector3(0, 0, Runner.DeltaTime * 0.2
f);
}
However, when the timer expires, the object on the host is smaller than the ones on the clients.
I would like to know why is that and how to solve it.
Comments
Hi @sabonette ,
The Transform Scale is not synchronized by the NetworkTransform component, you need to do it yourself, only the Position and Rotation will be in sync.
For this, you can just use a Vector3 Networked Property, and apply the changes on the other peers when the property changes as well, replicating the values from the State Auth.
--
Ramon Melo
Photon Fusion Team
Back to top