No announcement yet.

AddActorRotation On Two Input Events Causes Objects To Flip Out

  • Filter
  • Time
  • Show
Clear All
new posts

    AddActorRotation On Two Input Events Causes Objects To Flip Out

    Simple Pitch and Roll rotation using analog sticks causes actor to start 'flipping out'. Why is this happening?

    I have a Blueprint that contains a box mesh and a camera as a child of DefaultSceneRoot (images attached). Either input event defined causes the box to start spinning uncontrollably.

    This setup takes literally a couple of minutes to test yourself Images are all below. This is a test I'm trying to use and educate myself on issues trying to make an airplane rotate with roll and pitch (like real planes turn) and I'm having the time of my life. So I figured I'd start here to try and understand why this is happening first.

    I am using Engine Version 4.22.2.


    Last edited by erol_demirci; 09-22-2019, 12:46 AM.

    your problem is that you are adding actor local rotation instead of using a movement component's add movement node. also for future reference the axis event is constantly being fired and updating even when you are not pressing it. it is constantly telling the machine its axis scale even while its 0. Anyways, try add a vehicle, pawn, or character movement component to do movement. an input is fired multiple times per second (think about a mouse polling rate being a 1000hz it tells the computer its axis a thousand times per second). input is handled differently which is why ue4 provides the movement components. if you use vehicle or character you may have to specify flying in their settings. the way your doing it now is probably adding local rotation however fast the polling rate is for the input which is probably super high. Try adding a movement component and using the movement nodes it provides.
    Attached Files


      Hi Damnationist

      I have a few questions:

      1. Did you mean RotatingMovementComponent? The blueprint snapshot I provided illustrates a goal of rotating an actor based on the input of the analog stick.
      2. If I were to use a RotatingMovementComponent, would I not use the InputAxis events to feed into RotatingMovementComponent RotationRate, Pivot Translation, and whether or not it's local/world space?
      3. How would using a RotatingMovementComponent differ in that I would use the InputAxis event to feed data into the RotatingMovementComponent attributes, much the same as I would use an InputAxis event to feed data into an AddActorLocalRotation using a rotator? Would the InputAxis event not fire the same number of times per second for each approach?
      Last edited by erol_demirci; 10-03-2019, 08:31 PM.


        hey erol sorry im just now seeing this.

        1. im not familiar with the rotating movement component. I would suggest trying the character or vehicle movement components. I circled the character movement component in my pic. its in the upper right hand corner. when I add it to the blue print as a component I can use the blue controller input nodes. I think controller yaw, pitch and roll input is closer to the effect you desire.

        2. yes but using the movement components prebuilt by epic will require a lot of work and especially for any multiplayer scenario. I once built something like that on my own and soon realized that axis inputs are always firing even when they are zero and then also they have to be interpolated to look smooth for single and multiplayer. there is a lot going on in the background of the vehicle and character movement components that epic games built for us. if you choose not use them you will have to build a lot of that stuff on your own for things to look and feel how you would expect them to. and if its any kind of custom physics and such its usually in my experience best to use the components built by epic for prototyping. custom work takes a long time to get right sometimes.

        3. you will still feed the axis but I dont think you would have to break rotators or anything like that if there is an arrow component describing the forward vector. in mine the axis value is fed into add controller yaw input. since these add controller yaw, pitch and roll blue input nodes come from the character movement component all that stuff I would have to do otherwise is running in the background of the movement components. from what I understand add controller roll pitch and yaw are set up to handle input in the fashion we would expect.

        the blueprint scripting system is a virtual machine backend and there is still a lot happening in c++ in the back ground. when we add these components pre-built by epic we are adding a lot of code that has already been made for certain uses. we could rebuild these in blueprints but its not advised to because blueprints run slower than c++. we can however use blueprints to take advantage of the pre written code. some nodes may look like something we want but they are raw version of what we expect them to be and require some extra setup to get it the way we desire. Ive only been working with ue4 for a few months so there is still a lot that I dont know. I will have to try out the rotating movement component to see what it does. so far I have only used character and vehicle movement components.