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 to make a projectile attach on hit location?

i trying to make my arrows attach to the hit location, but event hit doesnt work.alt text

Product Version: UE 4.22 Preview
Tags:
untitled.jpg (42.5 kB)
more ▼

asked Apr 02 '19 at 04:19 AM in Blueprint Scripting

avatar image

Josdafrog
5 1 1

avatar image Josdafrog Apr 02 '19 at 02:10 PM

Ty for reply, but the event hit not even happens. alt text arrow blueprint

alt text no print string ( arrow is not attached, just crossing the mesh )

untitled.png (257.3 kB)
untitled2.png (373.3 kB)
avatar image duderseb Apr 02 '19 at 04:28 PM

I see you have a Sphere component in your BP, are you using this for collision? If so, could you try creating an EventHit Event from it to see if that one works?

avatar image Josdafrog Apr 02 '19 at 05:37 PM

alt text like that? doesnt work too

untitled.png (230.5 kB)
(comments are locked)
10|2000 characters needed characters left
Viewable by all users

3 answers: sort voted first

Ok, check its Collision settings to see if you have Simulation Generates Hit Events checked and that the Collision is set to Query and Physics. Also check that your collision channels are set to block the one used by the wall (the wall would also need to have these responses set eventually). For more detailed info I can recommend this doc.

more ▼

answered Apr 02 '19 at 05:54 PM

avatar image

duderseb
503 2 9 7

avatar image Josdafrog Apr 02 '19 at 09:04 PM

Nothing yet... alt text alt text

untitled.png (357.1 kB)
untitled2.png (758.3 kB)
avatar image duderseb Apr 02 '19 at 10:01 PM

Ok let's go off the Test actor now, I see you're using the Static Mesh as the collider but have you set up a collision volume for it? Simplest way would be to open up its asset in the Content Browser and set its Collision Complexity to "Use Complex as Simple" then try to see if the On Component Hit Event for the Static Mesh fires. That said, this is probably not the best approach because it uses complex (per-poly) collision which is expensive. After checking whether yours works, try this setup, which I just tested to work: alt textalt text My Static Mesh component has no active Simulate Physics, Generate HitEvents, or Generate OverlapEvents. The Sphere is also not Simulating Physics (because this is incompatible with the Projectile Movement component) but does generate Hit and Overlap events, which I use to detect for collisions and fire that OnHit event.

arrowcomps.jpg (118.2 kB)
arrowevents.jpg (166.5 kB)
avatar image Josdafrog Apr 02 '19 at 10:45 PM

Thank you! everything is working fine now.

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

There isn't enough information at all here. Is the screenshot from your arrow blueprint?

You will probably want to look at setting the World location of the Object (Or arrow) to the Hit Location from the event Hit as a start.

more ▼

answered Apr 02 '19 at 08:52 AM

avatar image

Dune
1.9k 53 40 200

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

Second what Dune said, then you'd want to deactivate your object so no more physics are simulated after impact (node: SetActive).

more ▼

answered Apr 02 '19 at 12:21 PM

avatar image

duderseb
503 2 9 7

(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