Announcement

Collapse
No announcement yet.

2D Side-scrolling Shooter Help

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    2D Side-scrolling Shooter Help

    Hi Unreal Community,

    I am fairly new to Unreal Engine 4 and I am attempting to create a small project, the idea is to make a blueprint that allows the user to use the arrow keys to aim a projectile weapon while progressing through a 2D level.

    I have tried looking at the few examples including the twin stick shooter and 2D platformer packs but so far I am confused as to how I can get the twin stick shooter mechanics to work on the 2D platformer example framework, can anyone help shed some light on how I can do this in blueprint please?

    Thank you very much.

    #2
    After further messing around with the 2D example and First Person Examples I have got half of the basics working, but I am just having a problem with keeping the projectiles spawning the same way that the pawn is facing now.

    Here is my Blueprint setup....

    Tutorial made Reticle
    Click image for larger version

Name:	1524358_10152662247944163_427291068541041146_o.jpg
Views:	1
Size:	162.5 KB
ID:	1064811

    Projectile Spawning
    Click image for larger version

Name:	885533_10152662247849163_4992042975953175097_o.jpg
Views:	1
Size:	65.7 KB
ID:	1064812

    Stick and mouse input are borrowed from the First Person example and Jump and Movement Inputs are borrowed from the Side Scroller Example Blueprints.

    The resulting problem I now have is in this video below...



    I wish for the projectiles to fire on the same axis the pawn is facing similar to older games like Contra and I was wondering if someone could help solve this last little problem.

    Comment


      #3
      Have you tried using the 'Get Forward Vector' method?
      Sr. Engine Programmer @ www.playspace.com - moritzwundke.com
      Remember: be polite and respect other peoples opinions - Join the Unofficial Unreal Discord Channel - Found a bug? Then use the Bug Report Form to get it fixed ^^

      Comment


        #4
        Originally posted by Moss View Post
        Have you tried using the 'Get Forward Vector' method?
        Yea I have tried that, problem now is it fires forward and not up or diagonal, so its half fixed, not sure how to fix the axis lock now..

        Comment


          #5
          The forward vector will do only that, forward to use the pitch you have to use the view rotation I guess and take into account it's pitch value.
          Sr. Engine Programmer @ www.playspace.com - moritzwundke.com
          Remember: be polite and respect other peoples opinions - Join the Unofficial Unreal Discord Channel - Found a bug? Then use the Bug Report Form to get it fixed ^^

          Comment


            #6
            Hi Moodydata,

            Did you lock the axis on the relative rotation of the player or did you do so in world rotation?
            Adam Davis | Marketplace Support | Epic Games
            How to report a bug? | Installation & Setup issues? | Answerhub Bug Reports | Twitter

            Comment


              #7
              Hi.

              Its pretty straight fwd.

              Get world location , Get world rotation -> Make transfrom

              That works for me.

              Just note to simply my life i created a simple box volume on my weapons to act as a socket just in front of the barrels.
              I get that sockets location and rotation and then make a transform from that.

              FWD vector gave me headaches due to what you described earlier.
              http://celestialarch.com
              Free UE4 things available. More coming

              Comment


                #8
                Originally posted by Adam Davis View Post
                Hi Moodydata,

                Did you lock the axis on the relative rotation of the player or did you do so in world rotation?
                No I did not, how do I go about doing that?

                Comment

                Working...
                X