void CreatePlayerRequest() { var system = Worker.World.GetExistingSystem <SendCreatePlayerRequestSystem>(); if (system == null) { return; } var origin = new Vector3(pos.x, FieldDictionary.WorldHeight, pos.z) + this.Worker.Origin; var point = PhysicsUtils.GetGroundPosition(origin); system.RequestPlayerCreation(SerializeUtils.SerializeArguments(new PlayerInitInfo(side, point - this.Worker.Origin))); }
Vector3 GetGrounded(Vector3 pos) { return(PhysicsUtils.GetGroundPosition(new Vector3(pos.x, 1000.0f, pos.z)) + Vector3.up * buffer); }
public float GetHeight(float x, float z) { var point = PhysicsUtils.GetGroundPosition(new Vector3(x / rate, 1000.0f, z / rate)); return(point.y * rate); }
public static Vector3 GetGround(int x, int z, float inter, float maxHeight, Vector3 origin) { return(PhysicsUtils.GetGroundPosition(new Vector3(x * inter, maxHeight, z * inter) + origin)); }