Announcement

Collapse
No announcement yet.

Stopping Character and Camera Rotation Temporarily

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

    Stopping Character and Camera Rotation Temporarily

    Only when left clicking, and maybe a few other actions, I want all rotation to stop. So if I left click and then swing my mouse around in every direction, nothing will happen and it will be fixed on where ever it was right before I left clicked.

    What's the easiest method to achieve this? Thank you

    #2
    bump 10char

    Comment


      #3
      Can show the blueprint where you are doing the rotation?
      Probably you can create a bool variable called bLeftMousePressed, set true on mouse down, and false on mouse up, and use a branch node before your camera rotation setup, so it only executes when the bool is true.

      (also, you aren't supposed to bump until 4 days have past)

      Comment


        #4
        Originally posted by Mosel3y View Post
        Can show the blueprint where you are doing the rotation?
        Probably you can create a bool variable called bLeftMousePressed, set true on mouse down, and false on mouse up, and use a branch node before your camera rotation setup, so it only executes when the bool is true.

        (also, you aren't supposed to bump until 4 days have past)
        That's exactly what I have. I have a left mouse bool but the problem is I don't know how to go about disabling the rotation.

        Comment


          #5
          You're probably going to need to post a screen shot of your blueprint

          Comment


            #6
            Originally posted by Mosel3y View Post
            You're probably going to need to post a screen shot of your blueprint
            There's nothing to show, though. My camera logic is that of the third person template. I have made no changes to it nor do I have any current blueprints in place that are interacting with rotation. I'm trying to inquire how I would even begin to disable camera rotation, like what nodes might be involved? I'm sure it will have something to do with the Camera Boom.

            I've done searches but I haven't found what I'm looking for yet. Obviously, I could just turn off mouse input which would stop all screen movement/rotation however that's not viable in this situation since I need the mouse input on.
            Last edited by Ziven; 11-05-2015, 05:28 PM.

            Comment


              #7
              Then this should work, this is the third person template character:

              Click image for larger version

Name:	b73457d89af94b988e68cc0876e5d3c9.png
Views:	1
Size:	145.7 KB
ID:	1092686

              Comment


                #8
                Originally posted by Mosel3y View Post
                Then this should work, this is the third person template character:

                [ATTACH=CONFIG]64812[/ATTACH]
                Yeah, thats the very first thing I thought of, however, a mechanic in my game requires the mouse input to be active even during this time where i want there to be no rotation. Basically the mechanic is that whenever I left click to go into attack mode, I can swing my mouse left, right, up or down and attack in that direction accordingly. However, normally when doing this, your camera will jerk all over the place while you're doing that. I want to stop the camera from flicking but keep the mouse input on so it can receive the directions for the attack.

                Comment


                  #9
                  It's not disabling mouse input, the events will still work fine so if you still want to do something else with mouse input just put a sequence node before the branch and do it. Or do you need control rotation for it too, just not on the camera?

                  Comment


                    #10
                    Originally posted by Mosel3y View Post
                    It's not disabling mouse input, the events will still work fine so if you still want to do something else with mouse input just put a sequence node before the branch and do it. Or do you need control rotation for it too, just not on the camera?
                    Wait, I see what you mean. I'll test it real quick.

                    Comment


                      #11
                      Ok yeah it works perfectly thanks a lot man.

                      See, I thought of this at first but I was like, "Nah... if I put a branch in the mouse input then I wont be able to get the Axis Input." but that was dumb of me to think that haha. ty ty

                      Comment

                      Working...
                      X