0
\$\begingroup\$

How can I create a scrolling effect like in Ikaruga, where the background is on Rails and the foreground is fixed with the player in Unity?

https://www.youtube.com/watch?v=H6d0PkEPKSk

Some more features would be:

\$\endgroup\$
  • \$\begingroup\$ Hi Vicky, usually questions that do not have one specific answer (like brainstorming, asking opinions or asking for material to read online) tend to be off-topic here. If you start working on the game you are describing, and have difficulty creating an effect that you saw on another game, that would be more on-topic. \$\endgroup\$ – TomTsagk Jan 8 at 16:35
  • \$\begingroup\$ Oh Sorry bout that. Yeah i had teh feeling the question is a bit too general. I change my question from brainstorming. \$\endgroup\$ – Greencurbwalker Jan 8 at 17:20
  • \$\begingroup\$ Generally all you need to do to make these sorts of things on-topic here is, instead of asking for resources about "doing thing X" just ask "how do I do thing X?" \$\endgroup\$ – Josh Jan 8 at 17:26
  • \$\begingroup\$ Ok guys I edited and shortened my question. Thanks for the clarifications. \$\endgroup\$ – Greencurbwalker Jan 8 at 17:47
  • \$\begingroup\$ You've asked at least five different questions here. In future, if you feel the need to add a bulleted list of "more features..." or "my questions are..." try asking just the first one, then see if the answer leads to you a solution for the others. If not, post a new question about the next bullet point you need help with. Keeping a question narrowly focused helps get detailed, in-depth answers faster. \$\endgroup\$ – DMGregory Jan 11 at 13:15
0
\$\begingroup\$

I would actually do this with two separate cameras rendering objects with two different culling masks.

  • One camera which moves through a 3d scene controlled by a Timeline - Unity's new recommended way of doing cinematic cutscenes.
  • One non-moving camera which shows the actual gameplay. This camera would be set to Clear flag: Depth only and Depth higher than the previous camera. This makes the render output of the first camera the background of the second.

This would allow me to implement the gameplay just like the official space shooter tutorial while I have the freedom to create the background scene in any way I want.

Another option: I suspect that some of these games might actually just play a pre-rendered movie in the background. If you want to go that way, you can use a Movie Texture to play videos created with a 3d animation software of your choice.

\$\endgroup\$
  • \$\begingroup\$ Thanks for the interesting suggestion Philipp. I really dont have much experience with the unity cameras and its capabilities. So thats definetly a good "recipee". I worked through the spaceshooter tutorial of unity which got me started in the first place. Do you have any suggestions how to create the 3d level environment? E.g if i want to have mountains the player needs to avoid while flying near ground using meshscrolling together with Rock-gameobjects is difficult because i need to match the scrolling of the mesh to the speed of the gameobject coming towards the player. \$\endgroup\$ – Greencurbwalker Jan 8 at 20:35
  • \$\begingroup\$ Sorry need to add something. ... Terrains on teh other hand cannot be scrolled very fast using translation.and if they have different heightlevels aligning them with the translation technique is impossible as there are gaps between the heights as well. I can provide screenshots from my game if necessary. \$\endgroup\$ – Greencurbwalker Jan 8 at 20:37
  • \$\begingroup\$ @Greencurbwalker Terrains are not supposed to be translated. If you want to create a camera flight through a terrain you should rather move the camera instead. \$\endgroup\$ – Philipp Jan 8 at 22:16
  • \$\begingroup\$ @Greencurbwalker Terrain collisions are not really in the scope of this questions, so you should post this as a new question. \$\endgroup\$ – Philipp Jan 8 at 22:20
  • \$\begingroup\$ ok. I am marking this answer as accepted. As I will test it out by creating a small demo. Thanks dude! \$\endgroup\$ – Greencurbwalker Jan 9 at 12:48

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.