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. 

Third-person character becomes detached from the camera

I rarely post here, but this one has me stumped. I am working on a 3rd-person shooter style game. The issue I'm having occurs after running some Blueprint code that essentially respawns the player. This is the second half of the code, that runs after things like enabling collision for ragdoll, playing a death sound, etc.:

alt text

After running the code, my camera is set to the location specified by the SetActorLocation node, but my character becomes disembodied from it. I can still aim, run, shoot, etc, and the camera moves as if the 3rd person character were still there. However, if I go over to the place my character died, I can see them moving about and performing all of the animations as I input the actions, but doing it all in-place and disembodied from the camera.

Another point I'd mention is that the script above worked perfectly for a different pawn that I was using, who has the same script (with different references, of course) contained within the character blueprint.

I understand giving a specific answer without all of the context and Blueprints could be difficult, but I hope I can at least be pointed in the right direction to find where the problem may lie.

Product Version: UE 4.18
Tags:
respawn.jpg (222.2 kB)
more ▼

asked Feb 01 '18 at 03:12 AM in Blueprint Scripting

avatar image

Drgy55
39 5 9 14

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

1 answer: sort voted first

I'm not sure what your specific problem is or why it works with one pawn but not the other. I can say that resetting the skeletal mesh after going ragdoll is notoriously difficult. Luckily, Epic provided a very nice solution during a training stream.

https://youtu.be/nkj6PAbGYtM

It covers a lot of other details but the main thing is a trick that gets the skeletal mesh snapped back into the capsule. It involves adding a body to the physics asset (19:40).

Worst case, if you can't figure out how to fix what you have, I can attest that his solution works. GL!

more ▼

answered Feb 01 '18 at 03:32 AM

avatar image

Jin_VE
4.4k 32 77 42

avatar image Drgy55 Feb 01 '18 at 03:53 AM

Wow, thank you for pointing out the video; I completely forgot to add a body to the root bone on my second character! I added a kinematic box to the root as I did with the first character and it's working perfectly now. Cheers!

(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