Position of projectile in N seconds

Hello.

I know this is a simple thing to figure out but I’m doing something wrong here.

I have a projectile - ridgidbody moving in 3D space effected by gravity - and I need to know where it will be in N seconds. I can figure out the horizontal easy enough but the vertical (gravity) side of things is not working out.

The second line of the function is clearly wrong but I don’t recall what the solution is.

/// <summary>
    /// Calculates where the object will be in n seconds.
    /// </summary>
    public Vector3 GetFuturePosition(float _InSeconds)
    {
        Vector3 FuturePosition = (mRigidBody.position + (mRigidBody.velocity * _InSeconds));
        FuturePosition += (Physics.gravity * _InSeconds);
        return FuturePosition;
    }

thanks

Never mind the question. Sorted it out…

/// <summary>
    /// Calculates where the object will be in n seconds.
    /// </summary>
    public Vector3 GetFuturePosition(float _InSeconds)
    {
        Vector3 gravity = Physics.gravity;
        Vector3 position = mRigidBody.position;
        Vector3 velocity = mRigidBody.velocity;
        float timeDelta = _InSeconds;

        position += velocity * timeDelta + 0.5f * gravity * timeDelta * timeDelta;
        return position;
    }