Announcement

Collapse
No announcement yet.

How can i chose a camera to use?

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

    #16
    I feel like I am close to getting this one of indygoofs working but I am incredibly frustrated with how hard it is to communicate to the camera

    I tried setting up an interface but that wasn't working

    So I tried using a macro. After all I made a macro for spawning my ships and it worked straight away and very easily and it meant my level blueprint could call the spawn function, hand over possesion and that's ALL I have to put on any new level

    Now I've tried to make a macro function called updatecamera or whatever but it keeps complaining that the BlueprintUpdateCamera function in indygoofs file shouldn't be called from a blueprint? WTF\??

    Is that function meant to be called automatically?

    Comment


      #17
      Originally posted by rodstone View Post
      I feel like I am close to getting this one of indygoofs working but I am incredibly frustrated with how hard it is to communicate to the camera

      I tried setting up an interface but that wasn't working

      So I tried using a macro. After all I made a macro for spawning my ships and it worked straight away and very easily and it meant my level blueprint could call the spawn function, hand over possesion and that's ALL I have to put on any new level

      Now I've tried to make a macro function called updatecamera or whatever but it keeps complaining that the BlueprintUpdateCamera function in indygoofs file shouldn't be called from a blueprint? WTF\??

      Is that function meant to be called automatically?
      Yes it seems it is, and I use Set View Target and some other things to access it? All of a sudden yes this is making sense! I haven't got it working yet but I think I am getting much closer

      Comment


        #18
        Originally posted by rodstone View Post
        I am feeling like a real ***** here but how do I communicate to that BPCamera?

        I tried making an interface for cameras, but as of now I am not entirely sure if that is correct.


        I really appreciate this help. I hope some day soon I "get" all of this because when I do I'll feel very happy about this and can move onto the next stage

        Hey rodstone,

        what exactly are you trying to "communicate" to the camera? Do you mean keypresses, or setting any variables from outside?

        If you want to set any variables from your playercontroller, you can directly call GetPlayerCameraManager->cast to BPPlayerCamera->Set Variable ... from your PC.
        I.e., i updated the Blueprint to have a public var named "FollowActor", if that var is set, it follows this actor instead of the controlled pawn (i updated CamStuff.zip too), so you could do this in your Playercontroller:
        Click image for larger version

Name:	PlayerControllerBP.png
Views:	1
Size:	122.9 KB
ID:	1056082
        FinalCamera on Marketplace / Web Demo
        TopDown Toolkit on Marketplace / Web Demo

        Comment


          #19
          Originally posted by indygoof View Post
          Hey rodstone,

          what exactly are you trying to "communicate" to the camera? Do you mean keypresses, or setting any variables from outside?

          If you want to set any variables from your playercontroller, you can directly call GetPlayerCameraManager->cast to BPPlayerCamera->Set Variable ... from your PC.
          I.e., i updated the Blueprint to have a public var named "FollowActor", if that var is set, it follows this actor instead of the controlled pawn (i updated CamStuff.zip too), so you could do this in your Playercontroller:
          [ATTACH=CONFIG]10223[/ATTACH]
          After re-reading the Camera documentation suddenly what you've done makes more sense and it definitely seems like it's the way to be done.

          I was trying to tell the CameraManager what target to follow, I didn't realise it would automatically get that from a SetViewTarget command

          Although I still haven't got it working, I think I am close to understanding it.


          Click image for larger version

Name:	Untitled-1.png
Views:	1
Size:	87.9 KB
ID:	1056083

          This is the level blueprint. It spawns the ship (works well) and then I am trying to set the view target directly after but while it compiles and everything it just doesn't seem to work

          Is there something more or less that I have to do?


          BTW thanks indygoof you are slowly helping me get over a MAJOR hurdle in making this thing work for me.


          e:
          "The UpdateViewTarget function in PlayerCameraManager queries the ViewTarget and returns that ViewTarget's Point Of View. This function is also what calls BlueprintUpdateCamera if you have subclassed APlayerCameraManager and are not looking through a CameraComponent."

          I don't see the UpdateViewTarget function anywhere?

          Comment


            #20
            Originally posted by rodstone View Post
            After re-reading the Camera documentation suddenly what you've done makes more sense and it definitely seems like it's the way to be done.

            I was trying to tell the CameraManager what target to follow, I didn't realise it would automatically get that from a SetViewTarget command

            Although I still haven't got it working, I think I am close to understanding it.


            [ATTACH=CONFIG]10225[/ATTACH]

            This is the level blueprint. It spawns the ship (works well) and then I am trying to set the view target directly after but while it compiles and everything it just doesn't seem to work

            Is there something more or less that I have to do?


            BTW thanks indygoof you are slowly helping me get over a MAJOR hurdle in making this thing work for me.


            e:
            "The UpdateViewTarget function in PlayerCameraManager queries the ViewTarget and returns that ViewTarget's Point Of View. This function is also what calls BlueprintUpdateCamera if you have subclassed APlayerCameraManager and are not looking through a CameraComponent."

            I don't see the UpdateViewTarget function anywhere?
            UpdateViewTarget is only available through C++ and not via Blueprint, thats why that special BlueprintUpdateCamera function exists.

            Apart from that, what are you actually trying to achieve? You spawn your ship and posess it, ok so far. Why are you explicitely setting your Viewtarget afterwards? Since your playercontroller should already have the BPPlayerCamera Blueprint assigned, this one should handle following the ship already?
            FinalCamera on Marketplace / Web Demo
            TopDown Toolkit on Marketplace / Web Demo

            Comment


              #21
              Originally posted by indygoof View Post
              UpdateViewTarget is only available through C++ and not via Blueprint, thats why that special BlueprintUpdateCamera function exists.

              Apart from that, what are you actually trying to achieve? You spawn your ship and posess it, ok so far. Why are you explicitely setting your Viewtarget afterwards? Since your playercontroller should already have the BPPlayerCamera Blueprint assigned, this one should handle following the ship already?
              I guess because it's not working? I added it just like you suggested and the camera just starts at 0,0,0 relative to the spawn point and doesn't move with the ship

              I have a feeling, and I don't know how to fix this, well, it seems that with pawn blue prints, the mesh that is the basis for the ship moves around but the very root of the pawn (which is a scene component or arrow or capsule I can't remember which I settled on) doesn't move with the mesh. Because I am using thrusters to physically move the mesh, as opposed to just moving the pawn with transform commands.



              Also, when I change some of the settings in the BPCamera it doesn't seem to affect anything, except FOV, that changes FOV but if I change the rotation or location the camera STILL spawns in the same place in the same direction. I was changing these as a check to make use this camera is even working and it seems to be given that FOV change actually changes something
              Last edited by rodstone; 08-30-2014, 06:19 PM.

              Comment


                #23
                Ugh I have just realised something that really really sucks

                So I was right, the Camera is locking to the ROOT of my pawn (like expected I guess) and while I haven't got the distance thing working (camera starts up at the same position as the ROOT) but the thrusters move the mesh that is the ship and not the root of the pawn, so the ship "leaves" the root and flies around the level.

                Because I wanted to make it so my shipsall were inherited from the same ship_parent so I could have consistent values and etc from them, but it means that the static mesh CAN'T ever be the ROOT. ****.

                I don't want to have to make every ship from scratch, and copy and paste all the variables like damage and etc. I just wanted so badly to make it so there wasn't redundant code and anything that had to be reused was then in a parent class or something...
                And just now I trialed it, I can't delete everything (component) wise from the parent pawn so I can NEVER get around this

                UNLESS I could somehow make the camera target the mesh component instead of the ROOT of the pawn. I don't see this being a good solution.

                I guess I could use an interface but I wanted to be able to inherit all the variables like damage and etc. **** I am annoyed I was so happy with how I was managing to make a future happy system for the future. Because I intend on having LOTS of ships and it seems bad practice to copy and paste things and re-do the same initial work for each ship.

                Comment


                  #24
                  @rodstone, can you somehow illustrate what you try to achieve? It sounds like you want to follow ship if it was selected?
                  It seems your problem should be easy, but somehow you already commited to your blueprint progress so far?
                  To find "structure" problem during prototype phase is very good and lucky, although you might need to re-work a lot of things, it's better than find it late.
                  A mock up screenshot would be really helpful to try understand your problem.
                  Unreal Engine 4 Game Framework diagram for relation of all major base object types
                  Unreal Engine 4 Input Event diagram, scroll down to section Input Processing Procedural
                  Resident Evil Classic Camera
                  RPCs official document, Must Read
                  Everything you should know about replication

                  Comment


                    #25
                    Originally posted by PenguinTD View Post
                    @rodstone, can you somehow illustrate what you try to achieve? It sounds like you want to follow ship if it was selected?
                    It seems your problem should be easy, but somehow you already commited to your blueprint progress so far?
                    To find "structure" problem during prototype phase is very good and lucky, although you might need to re-work a lot of things, it's better than find it late.
                    A mock up screenshot would be really helpful to try understand your problem.
                    Yes, it is early on so yeah, I'm prepared to do it all again, maybe even start completely from scratch because I find my filesystem of my project gets cluttered a bit and I need to personally sort out the file system structure and naming convetions I am going to used so later one isn't a nightmare

                    I might make a new thread asking for general advice on how to do this, and not cloud it up with what I have already done, but instead outline my requirements and see what advice people have to give me.

                    e: new thread maybe in Content Creation, instead of here because it's more than just blueprints
                    Last edited by rodstone; 08-30-2014, 10:13 PM.

                    Comment

                    Working...
                    X