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"

Projectile gains speed every time it bounces.

Hi, I've been trying to make a projectile that gains speed every time it bounces. So I used the On Projectile Bounce event to do it and have tried every thing: Set velocity in local space, set velocity, set initial speed, set max speed, etc. None of it has worked.

I'm no sure what I'm doing wrong, any help will be very much appreciated.

Product Version: UE 4.15
Tags:
more ▼

asked Jun 12 '17 at 06:18 PM in Blueprint Scripting

avatar image

Nappa12
3 1 2

avatar image navid100 Jun 12 '17 at 08:02 PM

please add some screenshots of how you set the velocity.

avatar image Nappa12 Jun 12 '17 at 08:43 PM

So the max speed and and initial speed didn't do any thing no matter what I tried.  The Set velocity didn't work when I tried to add or multiply the variable by it self (get velocity), it would just stop every time it hit something setting velocity to zero, but it worked when I did with a new vector, but now it only goes right.  I got the same result using the set velocity in local space. I'm still a noob in UE4 so please excuse the basic math.

untitled-1.jpg (288.2 kB)
avatar image Nappa12 Jun 12 '17 at 08:43 PM

So the max speed and and initial speed didn't do any thing no matter what I tried. The Set velocity didn't work when I tried to add or multiply the variable by it self (get velocity), it would just stop every time it hit something setting velocity to zero, but it worked when I did with a new vector, but now it only goes right. I got the same result using the set velocity in local space. I'm still a noob in UE4 so please excuse the basic math.

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

2 answers: sort voted first

To solve this, for some unknown reasons, you must set your projectile as the root component and also you must turn simulate physics off (otherwise it won't bounce, while overlaps and hit events still work). Go to projectile movement component and set 'should bounce' to true.

alt text

alt text

alt text

Unfortunately with this setup, other bouncing settings don't work (it's a bug maybe). Btw I have tried this setup and it worked. If you want to have more control over impacts, then break impact result and follow your desired bouncing conditions. Hope it helped.

Regards,

more ▼

answered Jun 12 '17 at 11:18 PM

avatar image

navid100
966 28 14 46

avatar image Nappa12 Jun 12 '17 at 11:33 PM

Nice, it worked. Thank you!

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

(X1000,Y1000,Z1000) * 500 is always going to be the same when the projectile bounces, meaning it wont add velocity as its always the same.

I would try something like:

alt text

BounceSpeed would be set to whatever % more you want to add to the velocity, each bounce.

capture.png (78.3 kB)
more ▼

answered Jun 12 '17 at 10:20 PM

avatar image

ImVawx ♦♦ STAFF
6.7k 114 17 127

avatar image Nappa12 Jun 12 '17 at 10:43 PM

I set it up as you example and every time it hits any thing it just stops dead.

alt text

untitled-2.png (319.4 kB)
untitled-2.png (319.4 kB)
avatar image Nappa12 Jun 12 '17 at 10:44 PM

alt text

untitled-3.png (652.2 kB)
(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