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"

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.

alt text

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.

alt text

Original Post in forum.to show all the other setup variables: https://forums.unrealengine.com/showthread.php?55122-Help-Set-Velocity-no-working.

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

Cheers

Narg

Product Version: Not Selected
Tags:
capture.jpg (37.3 kB)
capture.jpg (19.6 kB)
more ▼

asked Dec 26 '14 at 04:31 AM in Blueprint Scripting

avatar image

Narghile
1.7k 74 38 109

avatar image Hitsugen Dec 26 '14 at 08:08 PM

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

avatar image Narghile Dec 27 '14 at 11:24 AM

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

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

1 answer: sort voted first

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

more ▼

answered Dec 27 '14 at 01:23 AM

avatar image

PeterLNewton
2.1k 75 36 110

avatar image Narghile Dec 27 '14 at 11:23 AM

Correct, I need it to land in random location.

avatar image PeterLNewton Dec 27 '14 at 11:55 PM

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.

avatar image Narghile Dec 31 '14 at 04:38 AM

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

alt text

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?

Narg

capture.jpg (23.4 kB)
avatar image PeterLNewton Jan 01 '15 at 07:01 AM

Hi Narg,

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 object.

As shown below!

alt text

Hope that helps,

Peter L. Newton

avatar image Narghile Jan 04 '15 at 09:16 AM

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?

Narg

avatar image PeterLNewton Jan 12 '15 at 07:28 AM

Yes, that is exactly what you should do.

Peter

avatar image Narghile Jan 12 '15 at 08:24 AM

Just realised, I was watching your tutorial last night.

Unreal Engine 4 AI Behavior Tree & NavMesh

Thanks for advice

Narg

avatar image PeterLNewton Jan 14 '15 at 09:10 AM

Epic :D Thanks. No problem!

Peter

(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