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"

2D character rotation

Hello everyone.

I'v been scratching my head about this all day, either using blueprints or C++.

I am using the side-scrolling blueprint, and what I am trying to do is to have a 2D sprite as my player character. So, I am creating a sprite and dropping it on to the pre-made 3d character blueprint.

The problem I am having is, that the existing 3d character starts off facing the camera. This means my 2D character also starts off facing the camera too and is practically invisible (think as thin as paper). As soon as I move left or right, it appears. What appears to be happening is, the 3d character is setup to turn from -90degs to 90 degs over time.

I would like to have my 2d character start off facing one direction, and when a button is pressed it snaps to the other. I can sort of recreate this by changing the rotation speed stupidly high, but it feels like a workaround, and doesn't solve the initial rotation of the character.

If I just set the 2d sprite to be offset by 90 degrees, it shows facing at first, but then rotates between 0 and 180 degrees.

Below is the initial output alt text

And here is after I hit 'A' or 'D' to go left/right with a stupidly high rotation applied (please forgive programmer art).

alt text

I feel as though i am approaching this the wrong way, any guidance would be greatly appreciated.

Thanks for reading.

Product Version: Not Selected
ex001.png (316.1 kB)
ex002.png (201.2 kB)
more ▼

asked Jun 15 '14 at 09:25 PM in Using UE4

avatar image

6 2 3 4

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

1 answer: sort voted first

Assuming your sprite sheet has all axis in it for left right and what not. So you want the sprite to always face the camera. Note that Mob Name and Mtr Health are the components in the actor component list.

alt text

rotate to cam.png (394.3 kB)
more ▼

answered Jun 16 '14 at 12:19 AM

avatar image

638 57 55 68

avatar image nixius Jun 16 '14 at 06:05 PM

Thanks for this, very helpful.

(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