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"

Picking up and throwing objects and enemies (non-TPS/FPS)

If I wanted this little guy to be able to pick up that trash can object (and eventually an enemy character) and throw it at other objects/enemies, what would be the best way of going about it in BP?

alt text

I've looked through many tutorials that all seem to be based on FPS/TPS games with a line trace guided by the camera. As my character moves about independant of the camera (it's a multiplayer Brawler game), I imagine a different method is required.

For enemies, they will be animated while grabbed and lifted off the ground but still move around with the player so the throw can be "aimed" at things. Throwable objects might hide health pickups, but if that's too difficult/costly, I will reserve that for the smashables (like the arcade cabs in the back which can't be picked up but can be destroyed).

Product Version: UE 4.8
more ▼

asked Aug 05 '15 at 11:25 AM in Blueprint Scripting

avatar image

18 4 6 7

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

1 answer: sort voted first

Line traces should work depending on circumstances but ultimately you just need to get the characters forward vector and "throw" the objects in that direction. Those tutorials you watched I'm sure went over how to set a projectile velocity and physics so I won't go into that. To see what the item hit after throwing just use collisions and react accordingly.

Hope this helps! If it did please do me a favor and accept the answer by clicking the check mark located below the arrows next to the answer. Thanks!

more ▼

answered Aug 05 '15 at 12:24 PM

avatar image

1.4k 70 29 92

(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