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"

GTA-Like Camera

Hi everybody. I've set up my character starting from third person template, but instead of using the default movement input, I used two float variables that allows the blending between animations. So my character actually walks thanks to animations with Root Motion, and not with "move forward" function. Now I want to make a GTA-Like camera. So what I want is that when the character isn't moving, you are free to rotate the camera around the character, but if you give him an input, he turns in the look direction of the camera and starts walking in that direction. Now the problem is this: my "free camera look" works, but when I start walking the character doesn't turn to the camera's watching direction. He starts walking, but not in the camera's watching direction. These are my BP:

StrafeAnim

ThirdPersonCharacterBP

WalkBP

image share

Product Version: UE 4.12
Tags:
more ▼

asked Aug 30 '16 at 08:08 PM in Blueprint Scripting

avatar image

DjFrex
71 1 5 8

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

2 answers: sort voted first

I found a way to solve this. I'm using a "turn 90 degrees" animation turning the character by 90 degrees to the left or to the right if you "rotate around the character with the camera more than 90 degrees from the starting position of the camera (that is behind the character) AND if you give some input. Anyway now I'm having another little issue cause the character, when finishes turning, doesn't stay idle in that rotation. He make the turn rotation and then go back to the starting rotation when the animation finishes.

more ▼

answered Sep 02 '16 at 01:54 PM

avatar image

DjFrex
71 1 5 8

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

so, in theory, what you have to do is instead of just adding speed to y or x you need to get the direction the camera is facing and add speed to that direction.

about the pratical solution, i can't tell "just add this node here and plug this thing to it and it's gonna work" because i would need a better look at your code, but there's a "direction plug" in "Add Movement Input" should be easier if you use it

more ▼

answered Aug 30 '16 at 09:07 PM

avatar image

veccher
1.1k 31 18 66

avatar image DjFrex Aug 30 '16 at 09:12 PM

The problem is that I'm not using "Add movement Input" cause I'm using Animations to move the character to avoid sliding issues. What I should do is, in order: - If,for example, the camera is watching to the left of the character AND the character recieve the "Forward" input -> turn to that direction - change the variable's value that allows the animation to start.

(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