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"

Constraining paper character rotation to a 2d plane

I have a top-down 2d shooter game where I want to have the characters rotating to the direction they are travelling. This can be achieved by ticking a box in the character movement component, and also through get lookat direction in the graph editor.

However, to maintain the 2D effect, the actors must rotate only around the Y-axis, and as it stands they rotate through whichever combination of axes gets there most directly, resulting in the paper flip-book characters flipping over in 3D.

It feels like there must be a simple solution to this problem that must be met by almost every 2d game. Can anyone give me tip please?

Product Version: UE 4.16
more ▼

asked Dec 12 '17 at 10:42 PM in Blueprint Scripting

avatar image

1 2

(comments are locked)
10|2000 characters needed characters left

1 answer: sort voted first

I have fixed my ownb problem and am posting for others wioth the same issue.

Find Look At Rotation is always a 3D vector, and cannot be constrained. In a 2D game, the rotation will go crazy due to gimbal lock if the actor and its target share the same value on an axis (in my game everything is at Y=0).

If one actor is displaced (eg, Y=0.1) the issue is fixed, and is visually the same.alt text

more ▼

answered Feb 19 '18 at 03:31 PM

avatar image

1 2

(comments are locked)
10|2000 characters needed characters left
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