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"

How could I add physics upon hit when my character gets hit?

I am curious how would one (in blueprints) do the following:

  • When hit by object (discover which angle the hit happened)

  • Add Force/Launch in opposite direction

I am trying to make a hit reaction to being hit by big boulder in my game. Does one do this with animations or more simply thru blueprints.

Any insight would be appreciated (or event better a blueprint example), thank you... and a +1 coming for ya.

Product Version: Not Selected
Tags:
more ▼

asked May 21 '14 at 01:54 AM in Blueprint Scripting

avatar image

DreamBotStudios
146 32 48 54

avatar image [Epic] Gribbs ♦♦ STAFF Jun 04 '14 at 07:49 PM

Hi DreamBotStudios,

We have not heard back from you in a few days, so we are marking this post as Resolved for tracking purposes. If you are still experiencing the issue you reported, please respond to this message with additional information and we will offer further assistance.

Thank you.

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

1 answer: sort voted first

Very simply: create an event hit which would containt the necessary info regarding the colllision. You can use the "hit normal" to detemine the direction of the hit. Then simply normalize and inverse this vector to find its opposite. Finsih by connecting it to an "add force" function. I haven't put it here, but you may want to get the speed, mass etc. of the "other" actor/object and use it as a multiplier for the force after reversing the normal vector. Alternatively, you can multiply it with some constant.

alt text

more ▼

answered May 21 '14 at 11:29 AM

avatar image

alperenakyuz
2k 62 24 111

avatar image DreamBotStudios May 22 '14 at 03:13 AM

Thank you kind sir!!!

Much appreciated.

avatar image DreamBotStudios May 22 '14 at 03:26 AM

What kind of Collision Presets should my character be to find this "Add Force"?

Currently, it is unelectable when trying to select this node. I was trying to use it on my character, which is setup as a Pawn.

I tried using Physics Actor, but didn't help. Any suggestions... am I missing something to be able to pull this add force on my character

avatar image alperenakyuz May 22 '14 at 05:41 AM

Try checking the rolling ball template that comes with UE4 by creating a new project. Also, the Content Example game in Marketplace has a physics-driven UFO blueprint in "Blueprint Input Examples" level. IThe UFO bounces off the walls and creates a spark effect at the hit point. That should help you figure out how to do it.

(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