Recently, I’ve been working quite frequently with cameras and often I require them to interpolate, or move between two positions. Some example use cases are the following:
- Designing an in-game shop that focuses in on a non-player character
- Creating a tutorial for players to physically see elements of my game and understanding their purposes
Right now, the parameters for the Interpolate method are as follows:
Interpolate(endPos,endFocus,time)
However, if we look at the parameters of TweenPosition… (which is quite similar except that it only applies to two dimensions):
TweenPosition(endPosition,easingDirection,easingStyle,time,override,callback)
Note that it has an easingStyle… All I’m suggesting is that there be an added parameter to Interpolate and new Enums.
Interpolate(endPos,endFocus,time,camStyle)
Some example styles:
- Enum.CameraStyle.Linear - Goes in a straight line from current CoordinateFrame to specified end CoordinateFrame
- Enum.CameraStyle.Undulating - Unidirectionally drifts up and down (like trigonometric sin & cos until reaching specified CoordinateFrame
- Enum.CameraStyle.Shakey - Shakes the camera randomly until reaching the specified CoordinateFrame