public override void Do(PlayerObject player) { var target = PhysicsUtility.Raycast <MovableComponent> ( player.Movable.Position + .1f * Constants.Directions[player.Movable.Direction], player.Movable.Direction, Constants.UnitMask, .6f ); if (target && target.CanMove(player.Movable.Direction)) { target.Move(player.Movable.Direction); } }
public void VerifyLandedPos() { if (isClientVerify) { return; } Vector3 tilePos = StreamerManager.GetTilePosition(currentPos); RaycastHit hit; if (PhysicsUtility.Raycast(tilePos, Vector3.down, height, LayerConfig.ParachuteMask, out hit)) { isClientVerify = true; Vector3 hitRealpos = StreamerManager.GetRealPosition(hit.point); height = serverPos.y - hitRealpos.y; } }