Set Velocity Not Working

Hi All

I have a projectile that has a starting verlocity of 3000, I want make that vary a little to make things a little harder.

I set this up, following a tutorial but seems to not make a difference as the projectile lands in the same spot.

24974-capture.jpg

Then someone told me to do it this way, I linked it to a print screen and the values are changing but projectile still landing in the same spot.

Original Post in forum.to show all the other setup variables: Set Velocity no working. - Blueprint - Epic Developer Community Forums.

Am I missing something or should it not be done this way.

Cheers

1 Like

You said that the projectile was still landing in the same spot. Were you thinking of applying spread to the weapon instead of velocity?

If I’m understanding correctly you need velocity of your projectile to randomize on spawn?

Correct, I need it to land in random location.

I need it to move at random speeds. It is the same as a skeet, so looking for variance.

If you look at the variables in your Projectile. In the Details tab, there is more options you can enable. Search for Expose on Spawn for the variables you want to see when you Spawn Actor for the specified blueprint. Then you can set them On Construction, and the Projectile Component will read the updated variables.

Because whats happening is that if you set it the variables after the Projectile has been spawned. The velocity from the default variables have already been applied. So it continues to land in the same place.

1 Like

I went to my “Sphere” BP" and click on my projectile and search for Expose. Nothing :frowning:

25234-capture.jpg

I then looked in My Character BP where I spawn the projectile by hitting space.

Looked at the Variable and the node “SpawnActor Skeet DM Blueprint”, nothing there either.

I did find it under “My Projectile REF” Variable in the “My Character Blueprint”, ticked it there. No change, still doing the same thing.

Am I just looking in the wrong place?

Hi,

Yes you must look in the Variable section. You want to expose your variables, then set them OnConstruction of the Blueprint Projectile. Basically setting the properties before the Projectile Component initializes and shoots your .

As shown below!

Hope that helps,

Peter L. Newton

1 Like

As soon as Get UE4 working again, I will give that ago.

So I should plug a “float in range” into the Initial Speed plug?

Yes, that is exactly what you should do.

Peter

Just realised, I was watching your tutorial last night.

Unreal Engine 4 AI Behavior Tree & NavMesh

Thanks for advice

1 Like

Epic :smiley: Thanks. No problem!

Peter

1 Like

You don’t need the ToolTip in 5.4 Thanks a lot!