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 you limit/control the physics impact for projectiles?

I have a projectile that is working well. I want to have the projectiles cause a physic impact/hit on the physics objects they hit, but there seems to be no way to tweak their impact... at the moment its very drastic and I'd like to tone it down. For my projectile I'm just using an actor with a projectile moment component.

Product Version: UE 4.13
Tags:
more ▼

asked Sep 27 '16 at 09:59 AM in Blueprint Scripting

avatar image

sarchasm
76 15 19 24

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

1 answer: sort voted first

You can use "OnComponentHit" or "OnActorOverlap" at the other actor (whatever the projectile going to hit), and detect if the hit or overlap been caused by a projectile (the other Actor or other component of the event node, check the following image).

alt text

then you can simply add force using the (AddForce) node, and define it's direction to the forward vector of the projectile.

alt text

-m

more ▼

answered Sep 28 '16 at 02:36 PM

avatar image

mamoniem
1.2k 33 23 64

avatar image mamoniem Sep 28 '16 at 02:44 PM

I used the above method with some refinement to allow for different forces based on the mass and some other datatable values, and that was the result:

http://i.imgur.com/d1QDe5S.mp4

-m

avatar image sarchasm Sep 28 '16 at 10:49 PM

Thanks for the help! Solved it sometime late last night.

My problem was two fold. I had my top component as a "Scene Root", under that I had my mesh and then I had my Projectile Movement Component. As I understand it, the Projectile Movement Component updates the Root, anything attached to the root is teleported incrementally. This caused several problems when trying to detect hits.

Having looked at the projectile in the FPS template and this video by tesla, https://www.youtube.com/watch?v=1aSdzw5zPtg I got it all pretty much working. Using a radial force instead of actual physics collision between the projectile and the hit object gave me a lot more control on what was going to happen.

avatar image mamoniem Sep 29 '16 at 05:39 PM

best of luck :)

-m

avatar image Jin_VE Jun 02 '17 at 09:10 AM

While this solution works, the ability to set the force of the projectile's impact in the movement component is more than a reasonable expectation IMHO.

(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