Help determining a function for a given table of values

Hey, math nerds!

I’m attempting to make a game where the camera is already focused on the head for whatever scale. I did some experimenting and found that the point form some sort of exponential curve down. I suppose to better help visualise this, here’s the data I collected.

Character Scale: 1 -- Ideal Camera Offset: 0,0,0
Character Scale: 0.5 -- Ideal Camera Offset: 0, -0.5, 0
Character Scale: 0.25 -- Ideal Camera Offset: 0, -1, 0
Character Scale: 0.125 -- Ideal Camera Offset: 0, -1.25, 0
Character Scale: 0.0625 -- Ideal Camera Offset: 0, -1.4, 0
Character Scale: 0.03125 -- Ideal Camera Offset: 0, -1.5, 0

Anything beyond 1 would have an ideal camera offset of 0,0,0.

I plugged these values into Desmos for a better visualisation but I simply can’t figure out the function to get these values.

(Edited to add the graph here)

Haven’t used this side of the devforum yet, so if this post is a little misplaced, sorry! Else, help would be awesome!

I love math! Unfortunately, I was unable to find any function of scale to get the ideal camera offset. After that I put your data into good sheets, made a graph, added a trendline with the equation as a label and saw that it had no solution either.


Logarithmic had a lower R^2 Value, and polynomial will most likely become very inaccurate in extrapolating data.

However, I then reread your question. I believe there is a very simple solution to your problem. Try setting the CameraSubject to the player’s head. Let me know if that doesn’t work. Hope this solves your problem!

Did just what I needed. I wondered if there was a function for the CameraOffset, but I also considered the camera subject. Thanks for the help!

1 Like

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.