Exemplo n.º 1
0
        //@TODO(bma): Some of the props have different anchor points, can we back this into the metadata some how?
        private async Task BuildObjectManager_UpdateProp()
        {
            if (!HasPropSelected)
            {
                await Task.FromResult(0);

                return;
            }

            Profiler.Enter("BuildObjectManager_UpdateProp");

            Freecam freecam       = camera.Get();
            Camera  freecamNative = freecam.GetNativeCamera();

            RaycastResult result = freecam.GetLookat(currentProp);

            if (result.DitHit)
            {
                PlaceCurrentPropOnGround(result.HitPosition);
            }
            else
            {
                PlaceCurrentPropInfrontOfCamera(freecamNative);
            }


            Profiler.Exit();
        }