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"

Projectile Movement disables velocity changes after a hit event

Currently I'm trying to have a projectile which fires in a straight line, and when it collides with the world, it sticks there and from that point will home onto any enemy player that comes near it.

I have all the various parts working, but the homing code is all vector math, and having played around this for a bit I've realized the problem is that for some reason the projectile movement component ignores any velocity change after it's triggered a hit event. I'm assuming this is an optimization tweak, which makes sense in most situations, but if there's anyone around who knows exactly what it's doing to switch that off, or how I could switch it back on, that would be much appreciated.

Product Version: Not Selected
more ▼

asked Aug 17 '14 at 04:03 AM in Blueprint Scripting

avatar image

202 16 15 27

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

1 answer: sort voted first

Ok so the hit event on projectile movement components unlinks the projectile movement component from the root component so that any update events move nothing.

Fortunately the stop delegate for this happens after so you can easily fix this by calling "Set Updated Component" on your projectile movement component in the projectile movement component delegate and giving it your root component.

For example: http://i.imgur.com/fgrsXqr.png

Now your projectile will stop when hitting an object (and still call all of its hit events) and will still be able to receive velocity changes.

more ▼

answered Sep 26 '14 at 11:59 PM

avatar image

325 18 22 33

avatar image Hennez Sep 29 '14 at 11:05 PM

Absolute legend, exactly what I was looking for. Thanks mate.

avatar image CometGoat Dec 02 '16 at 07:39 PM

Thank. You. So. Much. Spent a long time looking at print strings stating that the velocity of the projectile was what I had calculated; the projectile was stuck in place. This solved that problem. :)

avatar image vegorama Aug 15 '17 at 08:27 PM

Dude, you saved my ass. Knew there was something funky going on with hit events, getting stuck, and projectile movement. Been trying to sort this problem for days now, great stuff.

(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