| public class PlayControl : MonoBehaviour { public Vector3 velocity = new Vector3(0, 0, 0); void Update() { // set velocity for sending message velocity = rot * forwardSpeed * 0.3f; ... |
| m_stub.Player_Move = (Nettention.Proud.HostID remote, Nettention.Proud.RmiContext rmiContext, float x, float y, float z, float vx, float vy, float vz, float angle) => { var g = GameObject.Find("RemotePlayer/" + remote.ToString()); if (g != null) { var control = g.GetComponent<RemoteControl>(); var p = new Nettention.Proud.Vector3(); p.x = x; p.y = y; p.z = z; var v = new Nettention.Proud.Vector3(); v.x = vx; v.y = vy; v.z = vz; control.m_positionFollower.SetTarget(p, v); |
| public class RemoteControl : MonoBehaviour { public PositionFollower m_positionFollower = new PositionFollower(); |
| class RemoteControl { void Update () { m_positionFollower.FrameMove(Time.deltaTime); var p = new Nettention.Proud.Vector3(); var v = new Nettention.Proud.Vector3(); m_positionFollower.GetFollower(ref p, ref v); transform.position = new UnityEngine.Vector3((float)p.x, (float)p.y, (float)p.z); } |
登录 后参与讨论
暂无评论,来抢沙发








