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"

Office Holiday

Epic Games' offices will be on holiday from June 22nd to July 7th. During this period support will be limited. Our offices will reopen on Monday, July 8th. 

Prevent Player from facing camera in the Side Scroller template?

How can I prevent the character from facing the camera or facing away from the camera when switching directions? A very little switch in directions always results in the character facing the camera. Like this http://i.imgur.com/eoDaXSb.png

I want the character to always face either left or right based on the last directional input the player made. I was looking for a turn speed input.

I'm sure it's a pretty easy thing to fix, but I couldn't find an answer.

Product Version: Not Selected
Tags:
more ▼

asked Oct 08 '14 at 04:39 PM in Blueprint Scripting

avatar image

Edmiwa
10 1 3 4

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

2 answers: sort voted first

Here is how I got it to work: create a new variable and call it DirectionPrev, set its default value to -90.

Wire your blueprint as shown in the screenshot (it's pretty self-explanatory, but let me know if you need any explanations):

alt text

facingdirection.jpg (328.3 kB)
more ▼

answered Oct 16 '14 at 08:06 PM

avatar image

alperenakyuz
2k 62 24 111

avatar image Edmiwa Oct 16 '14 at 08:26 PM

Just tried it, it works like a charm, Thanks a lot!

avatar image alperenakyuz Oct 16 '14 at 09:06 PM

Glad to help! Good luck with the rest of your project.

avatar image alperenakyuz Oct 25 '14 at 01:46 PM

Hey there, would you mind upvoting the answer so the question shows as resolved? Cheers.

avatar image Edmiwa Oct 25 '14 at 02:27 PM

I thought I did, but apparently it didn't register. Sorry about that!

avatar image Dexrid Jul 05 '16 at 06:34 PM

This was a big help. Thanks you two!

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

Hey, I think you can solve this problem by going to the defaults tab on your blueprint and setting "use controller rotation yaw" to true and "orient rotation to movement" to false.

more ▼

answered Oct 16 '14 at 05:07 PM

avatar image

alperenakyuz
2k 62 24 111

avatar image Edmiwa Oct 16 '14 at 07:44 PM

Thanks but it didn't work, at least not using a keyboard, I haven't tried using a 360 controller. Using a keyboard the character always faces in the same direction, and moonwalks instead of turning. I found a hacky solution that works by changing the rotation rate Yaw from 720 to something very high like 4320.

avatar image alperenakyuz Oct 16 '14 at 07:53 PM

Ok, give me a few minutes, I'll try it on my end.

(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