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"

What changes when the Third Person spring arm compresses?

I want to take the Third Person Blueprint template and simply add the functionality to hide the player model when the camera is too close to the character. I've been trying to figure out what value changes when the spring arm compresses (IE collides with a wall) but I can't for the life of me figure out what it is. I thought the Target Arm Length would be shortening but this value remains the same at all times. I also tried getting the relative location of the camera but that seems to be 0 at all times. I thought relative location meant it's location compared to the "zero" of the blueprint so you'd think this value would change when the camera moves closer when colliding with a wall. Very confused.

Any help is greatly appreciated. Thanks!

Product Version: UE 4.13
Tags:
more ▼

asked Jan 31 '17 at 10:14 AM in Using UE4

avatar image

TorQueMoD
1.1k 80 108 142

(comments are locked)
10|2000 characters needed characters left

1 answer: sort voted first

Hello The relative position is based on the closest parent, eg if you attach a camera to a scene component it moves relative to that component. If you attach it to the Root, then it will move relative to the "zero" of the blueprint.

I'm not to sure about what is moving when the camera is hitting something, but if the camera is actually changing its position one solution could be to compare the world position of the camera and the world position of the character? If you subtract the Camera position form the character you get a vector between them, then use the Vector Length to determine the offset form the character and branch with float greater then to trigger hide/show event of the character?

more ▼

answered Jan 31 '17 at 10:33 AM

avatar image

Alltvin
406 9 7 27

avatar image TorQueMoD Jan 31 '17 at 10:41 AM

Ahh yes, that worked brilliantly! Thank you so much.

avatar image Alltvin Jan 31 '17 at 10:43 AM

Glad I could help!

Don't forget to mark my answer as resolved and give it an up-vote for others with similar problem easier can find it.

Cheers!

(comments are locked)
10|2000 characters needed characters left
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