PSA: Box trace precision problem/bug.

I’ll post this on answer hub in a minute after here.

Basically this:


when you try this on say 3rd person template. It will give you output like this line:
(the wall to be traced happens to have X coordinate at -2330.0 ( it’s axis aligned plane so this should be uniform plane defined as X=-2330.0)
predict hit box center: X=-2268.000 Y=-1088.000 Z=192.000, hit box center: X=-2264.344 Y=-1088.000 Z=192.000,
Notice that the box center is suppose to be really close to X=-2268.0, but the result shows X=-2264.344.
This isn’t the only spot that have this problem, on 3rd person template I can find dozens of spot(even on floor) that box trace will results in slightly off the surface result.(greater than 1.0 unit error)
given that the wall in template are axis aligned, this is pretty bad. As if I want to spawn something in that space and does a box trace to see if anything occupied that area, this might throw me off, or I have to put in a pretty big error tolerance.
(say 10 units instead of 1 unit)

So if you are interested in doing spawn and spawn collision prevention, you might have to watch out for this.
If you tested it and don’t have this problem, please let me know.

I have found that when spawning, I find that the spawning is not happening on trace result.

When I finish updating UE4 (Hours or so), I will make a video and post. I will also post code to see if this is similar to what you are experiencing.

Regards

Basically, I don’t know if they properly fix the “Spawn even if colliding” bug, but from past versions, this flag should be always on and you should try to avoid it.
Because it will try to find a location above desire and spawn until there is no collision(usually where you don’t want to spawn anyway), and sometimes it will still fail after limited tries that use a lot of trace calls.

edit: here is my original investigation.

Going on that, I could not spawn, unless collide was ticked.