How to Spawn actor in random Y location
I am trying to spawn an actor from a BP in a random point along the Y axis. Currently trying to get it to spawn in a box I made, but when I try and spawn it the current way, it just spawns in the middle of the box every time.
(BTW the delay node was just to start spawning 4 seconds into the game but it is irrelevant in this post)
asked Aug 14 '16 at 07:40 PM in Blueprint Scripting
I just gave this a try and it works for me. Also your Min and Max values are the same, which will cause the actor to always spawn in the same place.
Let me know if that helps.
answered Aug 16 '16 at 08:12 PM
TJ V ♦♦ STAFF
You have some things to change there:
1) Random float in range, from and to are the same, so it will be always 5.
2) 5 is actually a very small value for a location (it is almost 5 cms I think), try to spawn your actor in editor, then move it +5 in any axis, you probably will note no difference at all. try something bigger, like -500 to 500.
3) Collision handling override, be sure is set to "Always spawn, ignore collision"
4) TransformLocation method I think is used to change from local space to world space, use "PLUS" instead, otherwise will spawn in 0-0-0 of the map.
answered Mar 07 '19 at 03:06 AM
Follow this question
Once you sign in you will be able to subscribe for any updates here