Retrieves the current float value by sampling a curve value on a specific GameObject.
Use this method when recording keyframes.