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"

Camera moving with character movement

Hi All, Pretty New to Unreal engine. Falt textollowing Unreal tutorials I am trying to create an endless runner game. I implemented 3 lane movement system (Thanks to unreal forums) which enables a character move only in 3 positions. For movement I am getting world location of capsule component and adding a fixed value from an array of 3 values to y direction [-150,0,150]. it works perfectly but my camera is moving with the character please see attached gif. As work around I used to get world location of mesh component and then add movement to it. now camera is not moving but character is dying even when is in another lane which doesn't have any obstacles as ![alt text][2]capsule component is staying in middle and mesh is moving as we give output to it. My guess is capsule box which hold character mesh is remaining in center and mesh/sekelton mesh is moving as we give input. how can I make this work so that whole capsule component can move as I give input but camera must not be effected. Thank you,

Product Version: UE 4.12
Tags:
meshmovement.gif (2.2 MB)
capture 03.gif (90.6 kB)
more ▼

asked Nov 22 '16 at 06:25 AM in Using UE4

avatar image

Vigetta448
8 2 4 4

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

3 answers: sort voted first

Perhaps you can put the mesh as a child of the collision capsule, then only move the capsule component. This will update collision while keeping the camera stationary.

more ▼

answered Nov 22 '16 at 06:44 AM

avatar image

Distul
536 33 22 39

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

I attached a picture I don't know what happened. Here it is again. If this helps please mark as correct answer, if not feel free to update me.alt text

untitled.png (11.7 kB)
more ▼

answered Nov 23 '16 at 07:15 AM

avatar image

Distul
536 33 22 39

avatar image Vigetta448 Nov 23 '16 at 03:29 PM

Hi Distul. I am using inbuilt 3rd person BP. I cannot make camera actor without making it child to capsule component. alt text

capture.png (9.5 kB)
avatar image Distul Nov 23 '16 at 05:10 PM

You can safely add new components and set them to root so that you may layer other components. Just remember, if you need to ever delete a root component, set another as root first, then delete.

https://i.gyazo.com/69164de9afffbd70c3a05360333eff59.gif

alt text

root.gif (194.1 kB)
(comments are locked)
10|2000 characters needed characters left
Viewable by all users

Hi. Is this what you wanted the camera to do? https://youtu.be/6EfBb9-dD7s

If so, Here is how I achieved it. Bit of a hacky way but it seems to work

alt text

Also I removed the Spring arm - not sure if it makes any difference.

runnerfix.png (342.8 kB)
more ▼

answered Nov 25 '16 at 01:55 PM

avatar image

linguini
8 1 2 4

avatar image Distul Nov 25 '16 at 05:59 PM

It's best to avoid using event tick when possible, and this problem can definitely be solved without using event tick. Using the method I mentioned above will work quite easily. You just make sure the spring arm isn't under the capsule as a child, and then move capsule only.

(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