# Set BoxCollision extents messes up collision

**URL:** <https://forums.unrealengine.com/t/set-boxcollision-extents-messes-up-collision/361076>\
**Category:** World Creation\
**Tags:** box-collision, unreal-engine, FeatureRequest, construction-script, Physics, Spline, Collision, Blueprint, question\
**Created:** [June 17, 2016, 8:03am UTC](https://forums.unrealengine.com/t/set-boxcollision-extents-messes-up-collision/361076 "2016-06-17T08:03:24Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Lusiogenic](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/lusiogenic/32/1054664_2.png) [@Lusiogenic](https://forums.unrealengine.com/u/Lusiogenic)\
**Post date:** [June 17, 2016, 8:03am UTC](https://forums.unrealengine.com/t/set-boxcollision-extents-messes-up-collision/361076/1 "2016-06-17T08:03:24Z")

</div>

I’m trying to construct a Blowing Fan that pushes the character upwards if it’s above it.

To make this easily editable, I’m using a 3 point spline to define the BoxCollision extents.  
The problem is that when I try to set the box extents calculated from the spline, it reduces the collision of the BoxCollision to only the central axis.

Does anyone know how to fix this?

Also, if you know of any other method to easily set the box collision extents per blueprint instance, please share it. I know I could have sliders instead of the spline, but from an usabillity standpoint it’s really not great.

I’ve shared the entire asset. Feel free to use it, modify it as you want and share the results.

Here’s the spline and the BoxCollision in edit mode:

![94922-blowing_fan_in_map.png](https://d3kjluh73b9h9o.cloudfront.net/original/4X/c/2/e/c2e0fa03ec503ac7b7f0bb874373611849c3e5da.png)

I’ve removed other parts of the construction script, but even with this, it messes up collision:

 ![94907-blowing_fan_set_extents.jpg](https://d3kjluh73b9h9o.cloudfront.net/original/4X/7/1/e/71ea42a0b49e14d51ca1d31ef8969c5aacc4f955.jpeg)

Here we can see that in-game, the character and the object overlap the BoxCollision but don’t generate an event:

![94923-blowing_fan_no_collision_character.png](https://d3kjluh73b9h9o.cloudfront.net/original/4X/d/8/7/d8707f5c441f2381b3563a524bdcf54082a48fc6.png)

Finally if it overlaps the central axis, it will move the character upwards:

![94924-blowing_fan_in_action.png](https://d3kjluh73b9h9o.cloudfront.net/original/4X/9/2/1/92176ff3937572e449a2b34d0b0273daa76dabd8.png)

Here’s the blueprint source file:  
[Blowing Fan UAsset][4]

---

<div class="post-metadata">

**Author:** ![rob.gray](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@rob.gray](https://forums.unrealengine.com/u/rob.gray)\
**Post date:** [June 17, 2016, 8:36am UTC](https://forums.unrealengine.com/t/set-boxcollision-extents-messes-up-collision/361076/2 "2016-06-17T08:36:25Z")

</div>

You’re feeding it negative numbers for X and Y of the box extents. Flip the order of the subtraction and it should work.

Also, In case you didn’t know, you can use the “pxvis collision” console command to visualize and debug your collision in-game.

---

<div class="post-metadata">

**Author:** ![Lusiogenic](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/lusiogenic/32/1054664_2.png) [@Lusiogenic](https://forums.unrealengine.com/u/Lusiogenic)\
**Post date:** [June 17, 2016, 8:59am UTC](https://forums.unrealengine.com/t/set-boxcollision-extents-messes-up-collision/361076/3 "2016-06-17T08:59:28Z")

</div>

Ah… that explains why the collision was just the central line.  
Thanks a lot for the answer and the tip!

---

<div class="post-metadata">

**Author:** ![TychoVII](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/tychovii/32/88719_2.png) [@TychoVII](https://forums.unrealengine.com/u/TychoVII)\
**Post date:** [March 28, 2021, 4:59pm UTC](https://forums.unrealengine.com/t/set-boxcollision-extents-messes-up-collision/361076/4 "2021-03-28T16:59:02Z")

</div>

I would just like to comment that this was also the solution for me. I’ve been banging my head against a very similar collision issue with Box Extents in Construction Script for a week. Once I finally narrowed it down to the construction script, it led me to this post. I fixed it by making sure I fed Absolute Values into my Box Extents. Thankyou.
