I have a box that spawn an actor .My problem is that after spawning first actor if i spawn second after then it jumped on it instead of move/push it forward. Is there way to spawn actor and move/push first spawn actor for spawn second actor at that location.
Place a trigger box in the spawn location. Before spawning, check if there’s something overlapping the trigger box. Move it away using Timeline+Lerp / Add World Offset / Vinterp (anyway you want to move it is fine), and once the actor no longer overlaps the trigger (e.g. OnEndOverlap) – spawn a new actor.
I have box blueprint that spawn after press button i want to spawn actor like this. after press button spawn actor at box collision/scene location.if press second time then push the first actor. My blueprint spawn the actor but it is not pushed by second spawn actor for take space . they just collide with each other and jump.
Make a blueprint that you can place in any level, instead of making it in the level BP.
i try to spawn actor at box collision. first i check is there any actor if yes then move it forward then spawn new actor. my first three actors spawn correctly then next actor start collide that make space between them and jump after collide. and the spawn actor move forward like a snake movement(waves) instead of straight.
How many if those do you need to spawn?
The one overlapping the trigger box is being moved by the timeline, but the other ones are pushed by the first one with physics. You’re only moving one actor with the timeline, whereas you can move several of them if you make a larger trigger box and [Get All Overlapping Actors] => [ForEach Loop] => Set Actor Location, just with some more math involved to calculate the movement of each one.
i am spawning one actor at a time after press button. there are some actors that is already spawn( placed)on ground . but some i want to spawn at button pressed.
That is quite clear. I mean how many do you want to be able to spawn one by one so that all the rest would move away? Is it dozens or hundreds? Are these cubes just meshes or blueprints?
Make a larger trigger box so that all 8 boxes would overlap it.
Make the movement function in the box blueprint, and when you spawn a new box, send to the other boxes that are overlapping the trigger a command to move.
i am spawning after press button pawn blueprint. the box actor blueprint spawned. i want to spawn different number of boxes at different levels. some time 5 sometime 8. but after press button only one box spawn at a time. so to spawn 5 box i presses 5 times. Everything is fine. problem is that 3 box spawn correctly after that box get collide with each other.I mean space get reduced between spawned box and spawn points then they start colliding.When new box spawn and it push the previous spawn box then it change its location after push it.when boxes pushed then it move in wave.
Is i have to use trigger box. but i have to use it on many places of my level and on each level.
Make a separate spawning actor. A blueprint that will spawn boxes when you tell it to. You don’t have to handle spawning in the level blueprint if you will have multiple levels with multiple spawning points in each.
With a dedicated spawning actor, you’ll be able to place any number of them in any level, orient them however you want, and when you want to spawn a box in any of them, just send them a direct function call or an interface message.