- Home /
Shoot 'm up 3D scrolling backgound
I'm creating a 2D shoot 'm up with 3D graphics (like for example R-Type). Right now I'm moving the player and the camera inside a container (empty game object) through the level. The container rotates around corners and sometimes spins upside down, etc.
When I instantiate bullets and enemies, I have to parent them with the container. But this is making it far to complex, because everything must move relative to the containers coordinate space.
So my question is: Can I create an animation for the level and move it (the level) behind the player? This way the player stays at the same coordinates. I can imagine that it is far to demanding to animate such a big object (mesh). And if it would work, is it better to make the level 1 giant mesh or make it in to separate meshes?
If you are 'just' talking about a 2D program where you want to animate the background, one solution which has been posted many time is to use $$anonymous$$aterial.SetTexureOffset(). That is the background does not move, the texture is just scrolled on the plane presenting the background. Google something like, "unity3d animate background material offset" to find many hits on the topic.
No I'm not talking about 2D, the background (level) wil be in 3D. The gameplay will be in a 2D plane.
Your answer
![](https://koobas.hobune.stream/wayback/20220613112029im_/https://answers.unity.com/themes/thub/images/avi.jpg)