- Home /
How to update NetworkView on child transform when only the parent is moving?
I have a way point-based tram system. When a network player enters the tram, their transform gets parented to the tram car and the player is set to be immobile. Both the tram car and the network player have a NetworkView reporting their respective transform, but the player still disappears from view to other network players. The player reappears on the other side of the tram ride after being un-parented from the tram car. I've tried attaching the players transform to the tram car's Network View at runtime, but this did not solve the problem. Any suggestions are welcome, I'm at a lose.
I think maybe the NetworkView only reports local position changes and not global, this would explain the lack of position updates from the player transform when it's a child of the tram car. Can anyone confirm if a NetworkView only reports local space transform changes?
Answer by outerringz · Jan 20, 2013 at 07:32 PM
I solved this by setting the players NetworkView observe to the rigid body instead of the transform, this addressed the problem of not reporting changes when set as a child to another object but also created the problem of not accurately updating the players rotation. I solved this by creating a RPC method to update the players rotation only after major rotation changes.