public static bool GetItemTrajectorySettings(GamePresentationCache cache, GameAction.ExecutionContext useContext, Vector2 direction,
                                                     out Vector2 spawnOffset,
                                                     out float radius)
        {
            spawnOffset = Vector2.zero;
            radius      = 0.05f;

            if (cache.SimWorld.TryGetComponent(useContext.ActionInstigatorActor, out ItemAction itemAction))
            {
                GameActionThrow throwAction = GetGameAction <GameActionThrow>(cache.SimWorld, itemAction.Value);

                if (throwAction != null)
                {
                    spawnOffset = (Vector2)throwAction.GetSpawnPosOffset(cache.SimWorld, useContext, itemAction.Value, (fix2)direction);
                    radius      = (float)throwAction.GetProjectileRadius(cache.SimWorld, itemAction.Value);
                    return(true);
                }
            }

            return(false);
        }
        public static float GetProjectileGravityScale(GamePresentationCache cache, GameAction.ExecutionContext useContext)
        {
            if (cache.SimWorld == null)
            {
                return(1);
            }

            if (!cache.SimWorld.Exists(useContext.ActionInstigatorActor))
            {
                return(1);
            }

            if (cache.SimWorld.TryGetComponent(useContext.ActionInstigatorActor, out ItemAction itemAction))
            {
                if (cache.SimWorld.TryGetComponent(itemAction.Value, out GameActionThrow.Settings throwSettings))
                {
                    return(GetEntityGravScale(throwSettings.ProjectilePrefab));
                }
            }

            return(1);

            float GetEntityGravScale(Entity entity)
            {
                if (!cache.SimWorld.Exists(entity))
                {
                    return(1);
                }

                if (!cache.SimWorld.TryGetComponent(entity, out PhysicsGravity grav))
                {
                    return(1);
                }

                return((float)grav.Scale);
            }
        }