RotationControl
How do I use Rotation Control
Below are practical examples compiled from projects for learning and reference purposes
Featured Snippets
File name: PhotonTransformView.cs
Copy
38 void Awake()
39 {
40 m_PhotonView = GetComponent
41
42 m_PositionControl = new PhotonTransformViewPositionControl( m_PositionModel );
43 m_RotationControl = new PhotonTransformViewRotationControl( m_RotationModel );
44 m_ScaleControl = new PhotonTransformViewScaleControl( m_ScaleModel );
45 }
File name: PhotonTransformView.cs
Copy
69 void UpdateRotation()
70 {
71 if( m_RotationModel.SynchronizeEnabled == false || m_ReceivedNetworkUpdate == false )
72 {
73 return;
74 }
75
76 transform.localRotation = m_RotationControl.GetRotation( transform.localRotation );
77 }
File name: PhotonTransformView.cs
Copy
102 void OnPhotonSerializeView( PhotonStream stream, PhotonMessageInfo info )
103 {
104 m_PositionControl.OnPhotonSerializeView( transform.localPosition, stream, info );
105 m_RotationControl.OnPhotonSerializeView( transform.localRotation, stream, info );
106 m_ScaleControl.OnPhotonSerializeView( transform.localScale, stream, info );
107
108 if( m_PhotonView.isMine == false && m_PositionModel.DrawErrorGizmo == true )
109 {
110 DoDrawEstimatedPositionError();
111 }
112
113 if( stream.isReading == true )
114 {
115 m_ReceivedNetworkUpdate = true;
116 }
117 }
File name: PhotonTransformViewRotationControl.cs
Copy
9 public PhotonTransformViewRotationControl( PhotonTransformViewRotationModel model )
10 {
11 m_Model = model;
12 }
Download file with original file name:RotationControl
RotationControl 132 lượt xem
Gõ tìm kiếm nhanh...