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"

Character wont turn

I have a problem, my character doesnt turn... I can move, but the character always faces the same direction.

Engine input:

alt text

Movement: alt text I would appreciate any help :)

Product Version: UE 4.12
Tags:
engine-input.png (12.9 kB)
unreal movement.png (193.5 kB)
more ▼

asked Aug 23 '16 at 07:26 PM in Blueprint Scripting

avatar image

DasBesteBruno
1 1 5 5

avatar image Doug E ♦♦ STAFF Aug 24 '16 at 05:36 PM

Hey DasBesteBruno-

Can you explain what you mean by your character doesn't turn? Are your screenshots from the third person template project? If so there should also be a section shown as Mouse Input in the character blueprint that controls camera movement

alt text alt text

With this set you should be able to use the mouse to rotate around the character.

mouseinput.png (10.6 kB)
avatar image DasBesteBruno Aug 24 '16 at 06:45 PM

I am trying to make controlls in a topdown perspective. I am doing a 2D Topdown, so I can use my own sprites... I tried adding the mouse but it doesnt work... I think its because mouse x works in 3 dimensions...

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

1 answer: sort voted first

Are you attempting to get the character to face the direction of the mouse, then? If so the following should help give an idea of how to get your character to face the mouse as the mouse moves around the screen. This worked for me when setup inside the character blueprint for the top down template character.

alt text

mouseposition.png (110.8 kB)
more ▼

answered Aug 24 '16 at 07:31 PM

avatar image DasBesteBruno Aug 24 '16 at 09:16 PM

Thank you, it really worked. But now I have a new probleme, the sprite is rotating in the Y axis/direction (2d sprites).

avatar image Doug E ♦♦ STAFF Aug 25 '16 at 02:15 PM

I would have to see your setup to know what's happening for certain, but one thing you can try would be to lock the rotation axis of the actor so that it is prevented from rotating in the Y direction.

avatar image DasBesteBruno Aug 25 '16 at 09:07 PM

where do I exactly block the rotation for a axis?

avatar image Doug E ♦♦ STAFF Aug 26 '16 at 01:27 PM

Which axis is your character oriented on? If they are not oriented along the X axis, please try rotating the character in your blueprint. If possible, please also include a screenshot of your rotation / movement setup in the graph of your blueprint to help me see what you're character is doing exactly.

avatar image DasBesteBruno Aug 27 '16 at 08:44 AM

So the charcacter flips like a coin (the character is a really eearly design, just so I have something to work with...) : alt text

alt text

So the Graphs: alt text alt text and a picture of the blueprin viewport: alt text

screenshot (2).png (602.5 kB)
screenshot (4).png (610.9 kB)
unreal movement.png (125.8 kB)
unreal turn.png (155.7 kB)
avatar image Doug E ♦♦ STAFF Aug 29 '16 at 01:13 PM

Your blueprint for your tick function doesn't quite match the setup I was using. If you right click on the Return Value for the Look at Rotation node as well as the SetActorRoatation node, you should see an option for "Split Struct Pin". If you select this option for both nodes, you can wire specifically the Rotation.Z (Yaw) so that X & Y (Roll & Pitch respectively) are unaffected.

avatar image DasBesteBruno Aug 30 '16 at 06:31 PM

Thanks alot for your help :) It worked...

(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