Announcement

Collapse
No announcement yet.

Confused by my own bp.. ship roll

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

    Confused by my own bp.. ship roll

    Hello i am trying to figure out how to reset the roll of my ship when the input axis is 0 .. But i am having a major headache .. I have created a variable called input right and this is set by the axis value .. Now i want to say (IF INPUT RIGHT IS >OR< THAN 0. SET WORLD ROTATION TO O ) However i cannot get this to work .. Could somebody please take a look at my bp and point out what i should be doing ? When i use the above method the ship rotates far beyond 90 degrees and is all messed up


    Attached Files

    #2
    Originally posted by mr_starfire View Post
    Hello i am trying to figure out how to reset the roll of my ship when the input axis is 0 .. But i am having a major headache .. I have created a variable called input right and this is set by the axis value .. Now i want to say (IF INPUT RIGHT IS >OR< THAN 0. SET WORLD ROTATION TO O ) However i cannot get this to work .. Could somebody please take a look at my bp and point out what i should be doing ? When i use the above method the ship rotates far beyond 90 degrees and is all messed up
    Doesn't look like you've included any specific nodes to set the Roll Rotation there...
    But rather than struggle this way, why not use an existing template and tweak it???

    https://forums.unrealengine.com/comm...ckups-and-more
    https://forums.unrealengine.com/comm...f-pawn-project
    https://forums.unrealengine.com/comm...t)=&viewfull=1

    Comment


      #3
      I have been tempted to use a template but i am a slow learner and forcing myself to find solutions is the only way i manage to learn .I find it very hard to deconstruct others work and make it work for myself .Also that bp i shown is how my current setup works and does not realy show my attempt to find a solution .It was me saying this is what i have does anybody have any ideas on how to implement "this" etc etc the following bluprint is my whole setup of my ship character as of now
      Attached Files

      Comment


        #4
        Originally posted by mr_starfire View Post
        I have been tempted to use a template but i am a slow learner and forcing myself to find solutions is the only way i manage to learn .I find it very hard to deconstruct others work and make it work for myself .Also that bp i shown is how my current setup works and does not realy show my attempt to find a solution .It was me saying this is what i have does anybody have any ideas on how to implement "this" etc etc the following bluprint is my whole setup of my ship character as of now
        Interesting to see how devs learn differently. To me its much faster deconstructing something that works.
        By you doing this all yourself (trial and error), I'd be worried about running into things like Gimbal Lock etc.
        I see now you have a Roll node but I've never used that one and no idea how it behaves (AH doesn't help).
        The tooltip mentions multiplying this by the PC's InputRollScaleValue, yet the target is Pawn, yikes, WTF?
        So still petitioning you to returning to use something that's proven to work, other than that its guesswork..

        https://wiki.unrealengine.com/Bluepr..._Pawn_Tutorial

        Comment


          #5
          Yh i guess your right . I have not gotten far into my dev on this project anyway so i guess its best to change my approach now rather than later .Which is a shame because i love how my current setup feels . .Apart from the issue of not rolling back into its start position it works prefectly well ..Oh well you live and learn i guess thank you

          Comment


            #6
            Originally posted by mr_starfire View Post
            Yh i guess your right . I have not gotten far into my dev on this project anyway so i guess its best to change my approach now rather than later .Which is a shame because i love how my current setup feels . .Apart from the issue of not rolling back into its start position it works prefectly well ..Oh well you live and learn i guess thank you
            I wouldn't give up what you've got working so fast... That's not what I'm saying...
            What I would do is borrow from the links above to correct-the-roll back to 'flat'.
            So use the other nodes above for that (for now), until you progress further etc.

            Comment


              #7
              Ok so i have been trying for hours and have had a good look at .At least 5 projects and i am still stuck.My project is now stripped back to the very very basics Could some more people see if you can offer some more advice on this please as i am ready to abandon yet another project

              Comment


                #8
                Can you tell exactly what are you trying to achieve ?
                Website [ LINK ]
                Twitter [ LINK ]
                Support ! [ LINK ]

                Comment


                  #9
                  Hi and yes of course my blueprint above is supposed to control my ships forward motion and the body roll. as well as the left right movement.Now most of that works fine ..However i need my ships roll to be leveled out when the input axis =0 Currently my ships rotation is not reset to 0 when the left analogue stick is released .hence it keeps moving in that direction and my roll is not reset ..Hope that makes sense ..I will be the first to admit im not a bright guy so please bare with me..PS thank you for any help in advance
                  Last edited by Mr_Starfire; 10-21-2017, 06:42 PM.

                  Comment


                    #10
                    You need to interpolate back to zero (flat) smoothly, probably in a loop run off tick or use something like a physics constraint to 'right' the ship mesh automatically. Epic's free hover ship exhibits this behaviour so you could just look at that. Can't help further as I'm not familiar with the nodes you use... They seem to work a bit differently to the more direct Add-World-Rotation / Set-Physics-Angular-Velocity etc...

                    Comment


                      #11
                      Here is a way to do what are you looking for.
                      To avoid issues, it's better to work in relative space so look at the hierarchy ( ship mesh is attached to a collision sphere)


                      Click image for larger version

Name:	test460.PNG
Views:	87
Size:	432.9 KB
ID:	1373428
                      Website [ LINK ]
                      Twitter [ LINK ]
                      Support ! [ LINK ]

                      Comment


                        #12
                        Hi i implemented this blueprint into my project and the ship does not roll. It moves very slowly left and right but with no roll ..I appreciate your help guys And i am very sorry that i am so incompetent .My mind is dragging me towards other projects which is what always happens when i hit a roadblock .Hence the reason i do not have any completed projects to show . Be honest guys should i take up knitting or something lol . hahah Can you tell i am feeling defeated?

                        Comment


                          #13
                          Originally posted by mr_starfire View Post
                          Hi i implemented this blueprint into my project and the ship does not roll. It moves very slowly left and right but with no roll ..I appreciate your help guys And i am very sorry that i am so incompetent .My mind is dragging me towards other projects which is what always happens when i hit a roadblock .Hence the reason i do not have any completed projects to show . Be honest guys should i take up knitting or something lol . hahah Can you tell i am feeling defeated?
                          Pity! The first part of Mhousse1247's code looks like its responsible for smoothly correcting the Roll back to zero.
                          Is your mesh / mesh hierarchy connected correctly, in this first 'Sequence Branch'... Sounds like maybe its not???

                          Comment


                            #14
                            Hmm maybe i will take a look

                            Comment


                              #15
                              is this wrong?
                              Attached Files

                              Comment

                              Working...
                              X