x

Search in
Sort by:

Question Status:

Search help

  • Simple searches use one or more words. Separate the words with spaces (cat dog) to search cat,dog or both. Separate the words with plus signs (cat +dog) to search for items that may contain cat but must contain dog.
  • You can further refine your search on the search results page, where you can search by keywords, author, topic. These can be combined with each other. Examples
    • cat dog --matches anything with cat,dog or both
    • cat +dog --searches for cat +dog where dog is a mandatory term
    • cat -dog -- searches for cat excluding any result containing dog
    • [cats] —will restrict your search to results with topic named "cats"
    • [cats] [dogs] —will restrict your search to results with both topics, "cats", and "dogs"

Top Down Character Does A Full 180 Turn/Flip

Hey Guys,

Not sure if anyone can help me with this, but my character randomly does a full 180 flip. I believe the cause for this is because the mouse moves over the body and causes it to flip completely. Here is a video, hope someone can help me figure this out or how to prevent it from happening.

https://youtu.be/wi-kKcR8Xcc

or

https://www.youtube.com/watch?v=wi-kKcR8Xcc&feature=youtu.be

Thanks

Product Version: UE 4.22
Tags:
more ▼

asked May 06 '19 at 08:09 AM in Blueprint Scripting

avatar image

GentalGiants
10 1 2 5

avatar image Lardo Deepdelver May 06 '19 at 09:40 AM

looks like a calculation error with your forward direction, but the resolution of the youtube video is too bad, I can't read the blueprints.

Maybe I can help if you make screenshots of your character blueprint

avatar image GentalGiants May 06 '19 at 10:40 AM

Sorry about the video, it was done in 720 not 1080 :/

This only seems to happen when I turn the character.

Here are the screenshots if this helps. alt text

movement.png (154.2 kB)
camera.png (131.0 kB)
avatar image Lardo Deepdelver May 06 '19 at 11:02 AM

looks fine to me,

steps I would try:

  • print out current yaw value to see when it changes

  • print out the axis value in the axis turn event to see what's the input that changes it, and to make sure that no other input has an influence on yaw

  • disconnect the AxisValue from the val in add controller yaw input, to make absolutely sure that that's the only input that changes the yaw value

avatar image GentalGiants May 06 '19 at 11:47 AM

Still not sure what is doing this, I did all the things you asked me to do but once it hits this Value it flips.

Value : 0.097577

Any idea what could be causing it?

avatar image GentalGiants May 06 '19 at 12:17 PM

It also turns out that it is the Camera that is flipping not the character.

avatar image GentalGiants May 06 '19 at 12:37 PM

Ok, so I sorted the problem out. I just changed it from being at a 90 Degree Y angle to 89 Degree Y Angle and it stopped the flipping. (This is with the Spring Arm)

avatar image Lardo Deepdelver May 06 '19 at 04:08 PM

I guess it's because of your top-down view, and how rotations work, will try a mini test when I'm in front of my home computer

avatar image Lardo Deepdelver May 07 '19 at 09:17 AM

made a small test myself, the problem comes from you looking top down on the object it appears that the unreal camera rotation update can't handle the top-down case perfectly.

Depends on what's your game is all about you have some options to work around that:

  • Don't do top down, just rotate the object you are looking at so that it feels like top down but your character is actually lying on the back or something like that

  • Don't use the camera rotation update system of the player controller, but rotate the camera yourself

avatar image GentalGiants May 08 '19 at 12:32 PM

Thanks for the reply with the possible fixes. I don't know why I didn't think of just rotating the character and not the camera.

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

2 answers: sort voted first

Answer to this problem with possible fixes : Thanks to Lardo Deepdelver : Depends on what's your game is all about you have some options to work around that:

  • Don't do top down, just rotate the object you are looking at so that it feels like top down but your character is actually lying on the back or something like that

  • Don't use the camera rotation update system of the player controller, but rotate the camera yourself

Quick Fix (By Me) :

  • Changed it from a 90 degree to 89 degrees.

more ▼

answered May 08 '19 at 01:25 PM

avatar image

GentalGiants
10 1 2 5

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

I'm not sure if it could be that but I noticed that the Player Start says "Bad Size". Yesterday it popped up to me as well while making a game and it gave me some problems with camera and collision.

From what I figured out you get that if you put Player start too close to some other object that it can collide with and probably get some issues. So try lifting it up a bit until it doesn't say "Bad size" anymore.

more ▼

answered May 08 '19 at 01:15 PM

avatar image

geginator
27 1 1 4

avatar image GentalGiants May 08 '19 at 01:23 PM

Yea, I fixed up that "Bad Size" issue yesterday once I moved the Player Start to the proper location and height. Thanks for the advice too :)

(comments are locked)
10|2000 characters needed characters left
Viewable by all users
Your answer
toggle preview:

Up to 5 attachments (including images) can be used with a maximum of 5.2 MB each and 5.2 MB total.

Follow this question

Once you sign in you will be able to subscribe for any updates here

Answers to this question