# Spawn Location not within box extent?

**URL:** <https://forums.unrealengine.com/t/spawn-location-not-within-box-extent/438739>\
**Category:** Blueprint\
**Tags:** spawn, child-actors, collision-box, actor-location, unreal-engine, question\
**Created:** [December 3, 2018, 2:18am UTC](https://forums.unrealengine.com/t/spawn-location-not-within-box-extent/438739 "2018-12-03T02:18:19Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![Re4verbot](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Re4verbot](https://forums.unrealengine.com/u/Re4verbot)\
**Post date:** [December 3, 2018, 2:18am UTC](https://forums.unrealengine.com/t/spawn-location-not-within-box-extent/438739/1 "2018-12-03T02:18:19Z")

</div>

So I am having this weird bug that doesn’t make any sense. I have this track with multiple trigger boxes throughout. I have portals that are supposed to spawn in each of these trigger boxes. However, It seems that the portals spawn in the center where they want, and NOT in the boxes they are blueprinted to. Does anyone know why this happens?

 ![260908-screenshot-372.png](https://d3kjluh73b9h9o.cloudfront.net/original/4X/7/5/9/75963da2c907239df257b0a6b36483e87e922d8b.png)

---

<div class="post-metadata">

**Author:** ![ThompsonN13](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@ThompsonN13](https://forums.unrealengine.com/u/ThompsonN13)\
**Post date:** [December 3, 2018, 2:30am UTC](https://forums.unrealengine.com/t/spawn-location-not-within-box-extent/438739/2 "2018-12-03T02:30:44Z")

</div>

i would say that your getting a point relative to the bounding box but placing the new portal based on the relative position of the main actor. you could try adding the location produced by the random point in bounding box node to the location of the portal spawn component, that should provide the offset needed.

---

<div class="post-metadata">

**Author:** ![Re4verbot](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Re4verbot](https://forums.unrealengine.com/u/Re4verbot)\
**Post date:** [December 3, 2018, 3:09am UTC](https://forums.unrealengine.com/t/spawn-location-not-within-box-extent/438739/3 "2018-12-03T03:09:12Z")

</div>

![261165-screenshot-375.png](https://d3kjluh73b9h9o.cloudfront.net/original/4X/5/0/a/50a8625257d2a08bd881494a108db82d1af88622.png)

Like this? It didn’t really fix the issue. It’s now stuck in one spot off center.

---

<div class="post-metadata">

**Author:** ![Re4verbot](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Re4verbot](https://forums.unrealengine.com/u/Re4verbot)\
**Post date:** [December 3, 2018, 3:22am UTC](https://forums.unrealengine.com/t/spawn-location-not-within-box-extent/438739/4 "2018-12-03T03:22:10Z")

</div>

Well I think I figured it out. I had to unparent the spawners from TrackMid. Then I had to reduce the boxes to scale 1 (it was set to ten because the whole track was scaled) and adjusted the box extent and I think that may have fixed it.

---

<div class="post-metadata">

**Author:** ![ThompsonN13](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@ThompsonN13](https://forums.unrealengine.com/u/ThompsonN13)\
**Post date:** [December 3, 2018, 3:25am UTC](https://forums.unrealengine.com/t/spawn-location-not-within-box-extent/438739/5 "2018-12-03T03:25:58Z")

</div>

i actually meant add the spawners relative location, but in any event even what you have should have done something.

what do your portals do? it may be better to spawn them as their own actor instead of a child component.

---

<div class="post-metadata">

**Author:** ![Re4verbot](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Re4verbot](https://forums.unrealengine.com/u/Re4verbot)\
**Post date:** [December 3, 2018, 3:31am UTC](https://forums.unrealengine.com/t/spawn-location-not-within-box-extent/438739/6 "2018-12-03T03:31:51Z")

</div>

They Teleport the player 5,000,000 UU up and 5,000,000 UU down. The portals transport you to different worlds with the same track.

---

<div class="post-metadata">

**Author:** ![Re4verbot](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Re4verbot](https://forums.unrealengine.com/u/Re4verbot)\
**Post date:** [December 3, 2018, 11:37pm UTC](https://forums.unrealengine.com/t/spawn-location-not-within-box-extent/438739/7 "2018-12-03T23:37:21Z")

</div>

Ok spawning its own actor fixed the problem, thanks. I just have one last issue. The portals, which teleport the user up or down to different tracks as shown below, have an issue where the teleport will move the camera to the track but the pawn will be destroyed.

 ![261218-screenshot-378.png](https://d3kjluh73b9h9o.cloudfront.net/original/4X/a/8/1/a8134c0b67e0dfad5a44101e1e3cd4f269763423.png)
