How to properly change collision box size?

I need to dynamically change the size of a collision box component of an actor.
I tried to do this using the “Set Box Extent” node, which at first sight seems to be the proper way.

226317-collision-set-box-extent.png

The changed collision box is correctly visible using the console command “show Collision”, so the change has some effect.

However, changing the collision box in this way does not seem to work with EQS. If I perform an environment query using an overlap test, it will work fine with the default collision, but it will lead to invalid results after calling “Set Box Extent”. The new results will not even be the default collision, but something undefined. The problem is not about bad timing, one second after changing the collision box EQS still returns invalid results.

226318-collision-eqs-overlap.png

How do I properly change the collision box size so that EQS is updated and will consider the new collision box?

I found the cause of this problem: This is a bit awkward, but well: If you call “Set Box Extent” with negative sizes (meaning the absolute values to be used) it will show correctly on “show Collision” command in the console. But for EQS you need to provide positive values.

Thanks! This really helped

Yep, was setting box extents from another component and the values were indeed negative. Absolute valued them and we’re good to go! Thanks for this.