Esempio n. 1
0
        private bool TryPlaceJigOnLot()
        {
            Vector3 position    = SimToAbduct.Position;
            Vector3 randomDirXZ = RandomUtil.GetRandomDirXZ();
            FindGoodLocationBooleans fglBools = FindGoodLocationBooleans.Routable | FindGoodLocationBooleans.AllowOnStreets
                                                | FindGoodLocationBooleans.AllowOnSideWalks | FindGoodLocationBooleans.AllowOffLot;

            if (!GlobalFunctions.FindGoodLocationNearby(mJig, ref position, ref randomDirXZ, 0f, GlobalFunctions.FindGoodLocationStrategies.All, fglBools))
            {
                return(false);
            }

            mJig.SetPosition(position);
            mJig.SetForward(randomDirXZ);
            mJig.SetOpacity(0f, 0f);
            mJig.AddToWorld();

            return(true);
        }