As a newbie developer, I like to experiment with different things to learn as much as possible. So, I’ve been wondering, “How will I go about creating a parallax effect using parts?” I know that people have been able to create a parallax effect for UI, but is it possible to create it with parts in a workspace? For example, a moving 3D background that infinitely generates due to the parallax effect?
Please correct me of any mistakes I may have made making this post
If your character moves, you get parallax ‘by default’ by placing things different distances from the camera.
If you’re moving your background and your character is staying still, then move the background by a fraction of the amount you move the foreground, scaled by the distance between the layers.
But honestly the best way is to just move the camera/character and use the fact that it’s a 3D world to get parallax by default. Then all you have to worry about is infinitely generating the background (and removing parts of background that are out of frame).
A parallax effect is just the byproduct of objects being at a different distance from the camera and at a different angle from its center. The only way not to get parallax is with an orthogonal projection, which displays everything through a field of view of 0 degrees.
This image perfectly demonstrates the difference between a perspective view (left) and an orthogonal view (right). An orthogonal projection makes all objects appear the same size with the only thing giving away their distance being their Z order; otherwise, it is impossible to know whether something is 1 cm or 2000 km away.
Roblox uses a perspective view, so it is practically impossible to get rid of parallax. Even if you set your FOV to 0, it will look too zoomed in as you cannot change the size of the viewport; however, you can emphasize it by increasing the distance between objects and messing with the FOV.