Search Unity

How to animate a 3d SHMUP environment?

Discussion in 'Animation' started by Berserker44, Dec 28, 2013.

  1. Berserker44

    Berserker44

    Joined:
    Sep 1, 2013
    Posts:
    29
    Hello!

    I have a semi complex question. I have been incredibly inspired by the side scrolling shmup tutorial that was release recently by unity's development team.

    Instead of an animated texture plane, I would like to take this project to the next level by adding a Scrolling 3D Environment . The environment would move will the player stays in the restricted "game zone". similar to something like Einhander
    . One thing to note is that the environment speed and direction would change to the situation, so having a simple linear scrolling environment wouldn't do

    My question is what would be the best way to go about this? Should I animated the entire level using unity's animation tool or is there an editor extension like playmaker that would be helpful? I bought and tried some of the assets on unity but they don't seem to help

    any pointers or suggestions would help and i greatly appreciate your time, thank you!
     
  2. JoeStrout

    JoeStrout

    Joined:
    Jan 14, 2011
    Posts:
    9,859
    I'm not sure exactly what you're asking — could you provide a link to that "shmup" tutorial you're talking about?

    In general terms, it sounds to me like you just want the camera to follow the player around. This keeps the player at or near the center of the screen, while the environment appears to move around him... but in fact, it's much easier (though technically equivalent) to think of this as the player and camera moving, rather than the environment moving.

    To do this in Unity is pretty trivial... a simple camera script will do. There may even be something that already serves your needs, like the Smooth Follow script in the standard assets.
     
  3. Berserker44

    Berserker44

    Joined:
    Sep 1, 2013
    Posts:
    29
    Thanks that is an excellent suggestion. to clarify I would essentially like to replicate how Einhander (attached video) does they're Scrolling. Another thing to to note i that i would like this to targeted for mobile devices so I don't want the entire level loaded at at single time.

    Ill look into making/finding a way or script that will allow me to animated the camera.
     
  4. JoeStrout

    JoeStrout

    Joined:
    Jan 14, 2011
    Posts:
    9,859
    Well, for starters, just (1) position the camera in the scene editor so it's looking at the player object; and then (2) in the Hierarchy window, grab the camera and drag it into the player object.

    Now just run, and you'll find that the camera stays pinned perfectly to the player — so the player stays fixed in the center of the screen, and the rest of the world appears to move around it.

    As for mobile, I wouldn't worry so much about that. You can load a pretty big level on mobile without causing a problem; bigger performance problems are probably lurking elsewhere. If it does prove important to trim the visible level, then you can divide it into sectors and load only the sector the player is in, plus the immediate neighbors. But again, I'd worry about that later, after establishing that it is a real problem.
     
  5. Berserker44

    Berserker44

    Joined:
    Sep 1, 2013
    Posts:
    29
    Thank you JoeStrout. I am incredibly grateful for your expertise and kindness. I'll look into using these development strategies as you stated.