How can I rotate my flying pawn past 90°?
Im currently in the flying blueprint template messing around in blueprints trying to create a mechanic where upon hitting a key (in this case its Z) the ship will pitched up 180 degrees (a half loop) for you and will make the ship face the other way as a sort of evasive maneuver. However, no matter what I try, it'll only rotate by 90 degrees and no more. I have tried most of the rotation nodes like set actor local rotation but that just causes the ship to go mental. Any ideas?
asked Jun 12 '18 at 02:34 PM in Blueprint Scripting
We can try to do it without Rinterpto, to find out if Rinterpto is the problem.
Timeline is pretty straightforward to use. You just Create a Timeline Node, double click it, then create a float track and set two or three keyframes in the graph that opens, Then use the float track's output as your new rotation value, and use SetActor Rotation, putting that float into the Pitch axis.
So Keyframe 1 is going to have a value of 0 so you start at 0 pitch. at time zero seconds. Keyframe 2 could have the -180 value at 5 seconds.
You could have more keyframes in between on the track like a middle one to make sure it rotates up to 90 or -90 degrees first before going to the full 180
hope it works
answered Jul 14 '18 at 08:54 PM
You want the ship to do a 180 from its current rotation, right?
In your blueprint you're simply setting the pitch to 180 degrees instead of adding 180 degrees to the ship's current pitch.
answered Jun 12 '18 at 03:08 PM
I believe this would do it, haven't tried it tho. Sorry if I'm already bringing up a solution that has already been submitted ;3
Please see this picture of my solution:
Also, if your pawn used pawn control rotation, this wouldn't allow you to turn more than 90% upwards, as no cameras controlled by player-input directly can't look backwards using only the pitch-axis. However, if your camera is controlled by the pawn, you can add rotation to the pawn further than 90% on the pitch, and the camera with follow along with it.
Hope this was helpful! :)
I think you are experiencing Gimbal Lock. This is a weakness in the Euler Rotators used by Unreal and most 3D engines.
I have heard there is a way to overcome it by using Combine Rotators node, supposing that it internally uses Quaternions to calculate the output Rotator. Perhaps that will work (I dont know for sure) to take your current rotation, and then put the added amou t to rotate on the second input of the Combine Rotators node and then do set Actor Rotation from that combine Rotators output.
Let me know if that works.
answered Jun 12 '18 at 03:04 PM
Follow this question
Once you sign in you will be able to subscribe for any updates here