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 do I change the gravity of a projectile?

I am simple trying to make the standard yellow ball projectile to have no gravity affect and change the expiration time. for some reason the settings i change are incorrect, would i edit the projectile settings or the character that spawns the projectile.

Product Version: Not Selected
Tags:
more ▼

asked Apr 07 '14 at 01:30 PM in Blueprint Scripting

avatar image

Jahmahn
18 4 7 9

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

1 answer: sort voted first

Howdy!

Sounds like what you are looking for is under the Components tab of the Projectile. On the Projectile component, under details, find Projectile Gravity Scale and set that to 0.

alt text

For the expiration, look on the Event Graph and perhaps add a Delay node before Destroy Actor.

alt text

Hope this helps!

-W

gravity.png (13.2 kB)
delay.png (38.6 kB)
more ▼

answered Apr 07 '14 at 01:45 PM

avatar image

DizzyWes ♦♦ STAFF
5k 145 64 206

avatar image Jahmahn Apr 07 '14 at 02:03 PM

apparently the delay did not affect the projectile being destroyed at a different time. and is there an option to allow the movement speed of the character to affect the speed of the projectile.

avatar image DizzyWes ♦♦ STAFF Apr 07 '14 at 02:10 PM

Depends on how you are calling the destroy. If you want it to destroy no mater what after X seconds, you'll need to hook it up to Event Begin Play so that when it starts, it is destroyed after your specified time (attached image). I've also set it so that when it hits something it destroys itself (which ever comes first).

The way I mentioned above was hooked up following an overlap event so that once it hit something, it would destroy itself after the specified time.

Just depends on how you want to destroy the object.

alt text

destroy.png (112.4 kB)
avatar image Jahmahn Apr 07 '14 at 02:18 PM

thanks a lot, not much tutorials out there yet, appreciate your time to help.

avatar image leofucci Dec 04 '18 at 04:01 AM

If you say you are looking to the 1st person example, then the Destroy actor is inside a property, not in the code. Open the "FirstPersonProjectile" blueprint, click on the component "SELF" at the left components tab. Then on the details section at the "ACTOR" section, you will see an "Initial Life Span" property that I think is defaulted to 3. remove that value and the projectile will not be deleted. Once you remove that, you can change it programatically. (Probably if you put a value greater than 3, this property was winning before your value)

(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