When would you typically use Linear / Cubic interpolation in a games coding? It seem in this example of a racing / car game with the movement Linear and Cubic Interpolation does not work well. In something like an FPS or Thirdperson I imagine it could work but might run into weird hit registration issues as well.
In game development, interpolation is a common technique used to smoothly transition between different states of an object over time. In Unreal Engine, linear and cubic interpolation are commonly used for different purposes.
In a racing game, you would typically use interpolation to smooth out the movement of the car as it moves around the track. However, linear and cubic interpolation may not be sufficient for complex movement patterns such as sharp turns or drifting. In such cases, other techniques such as spline interpolation or physics-based movement may be more appropriate.
In an FPS or third-person game, linear and cubic interpolation can be used to smooth out the movement of the player and other objects. However, as you pointed out, interpolation can cause issues with hit detection, especially in fast-paced games with quick movements. To mitigate this, game developers often use a combination of interpolation and extrapolation techniques, along with other strategies such as lag compensation, to ensure accurate hit detection.
Some other info on what you provided that could be helpful(definitions for LERP and SLERP):
Linear interpolation (LERP) is used to create smooth transitions between two values. For example, if you want to smoothly move an object from point A to point B, you can use linear interpolation to calculate the intermediate positions between A and B.
Cubic interpolation (Slerp) is used to create smooth transitions between rotations or orientations of an object. It works by interpolating the rotation quaternion values between two orientations.
Hope this helps!
Thanks for the detailed write-up. So if I want to learn more / expand on knowledge for multiplayer coding do you know of any example projects or other resources good to learn more?
If you don’t have it, gamedev tv has a multiplayer course but if not a simple unity multiplayer search on YouTube will bring you a bunch of tutorials, for example:
Hope you find a right tutorial!
I am in the multiplayer course C++ for unreal. Its answering some questions but leads me to many more like the use of Slerp in a basic car setup that doesn’t quite work. (In the course this is hows its showing us LERP and SLERP)
Oh my bad, I don’t know why I suggested a unity course, here are some unreal courses you can try:
A big series that has lots of useful stuff
A video that breaks down the framework
Lerping fundamentals
Also YouTube in general has lots of tutorials, sorry again for giving you unity tutorials.