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"

3rd person - how to hold object in hands?

Hi, i want my character holding object in hand by pressing E, then drop it by pressing E again.

just like here https://www.youtube.com/watch?v=dlGOsfelXCw

can you help me to start? Maybe some kind of tutorial, or explain how to do that.

Thank you

Product Version: UE 4.21
Tags:
more ▼

asked Jan 16 '19 at 09:08 PM in Blueprint Scripting

avatar image

Aldy
1

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

1 answer: sort voted first

In that example it would go like this (keeping this high level so you can see the systems involved):

  1. Find if there is something to pick up. You can trace from camera or character. You could use a radius check or overlapping check. Whatever fits the bill.

  2. Once you have found an object you play the pick up animation. The animation has an animNotify for when it is in the pickup part of the anim

  3. When the animNotify fires you attach the pot to the proper bone/socket in the skeleton. The bone is animated to make sure the pot looks correct or you have some animBP code for keeping it oriented.

  4. When you drop the pot you play the drop anim (may be the same as the pick up honestly) and the animNotify triggers

  5. Use this notify to detach the pot. You will have to figure out where to drop it. This could just be a trace from a little in front of the character to the ground to find a good place. You'll need code to verify it is a valid location for a pot though, so it doesn't place in things or through walls/etc.

The input part would be handled by capturing E (or better yet, add an input tied to E in the input ActionMapping) checking if you are already carrying something and then calling you pick up or put down based on that result.

more ▼

answered Jan 20 '19 at 04:51 AM

avatar image

Rymbrant
66 1 3 6

(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