Skip to content

Latest commit

History

History
22 lines (19 loc) · 640 Bytes

File metadata and controls

22 lines (19 loc) · 640 Bytes

You'll need to make the FirstPersonPlayer a ghost component and synchronize the ControlledCharacter field. This will ensure that the entity references set up by the server when instantiating a character will be carried over to clients:

[GhostComponent]publicstructFirstPersonPlayer:IComponentData{[GhostField]publicEntityControlledCharacter;}

Then, make FirstPersonCharacterComponent a ghost component and synchronize the ViewPitchDegrees field:

[GhostComponent]publicstructFirstPersonCharacterComponent:IComponentData{// ...[GhostField]publicfloatViewPitchDegrees;}