I’m making a first person shooter. I’ve noticed the player’s collision capsule is consistently 2.15 units higher than I’d expect it to be. I’m guessing all moveable collisions do this. But it’s something I just noticed.
Is this by design on the engine side?
It’s causing problems when I’m trying to get the player to a specific location with collision off, and then I reenable collision and it pops up 2.15 units.
If this is not addressable on the engine side, is there any recommendation on how to proceed? With the spots I want the player in, should I just add 2.15 to them in Z?
It’s weird because at first when my character spawns in they are a few pixels above the floor, but after they land from jumping or fall onto another platform they sink to the correct height.
I had given up on this for a few months but here I am again. I’ve been working for a the last week trying to figure out a solution. It’s really convoluted and still isn’t satisfactory.
My game’s a 2d sidescroller but I’m sure part of this solution will appy. I’m also using the “Use Flat Base For Floor Checks” in my character movement node.
Besically, I check when my character is moving on the ground then do a line trace on either side of my character to get where the ground location is (you can also use the “check floor” when you pull of from the character moevement node, then break hit result and there should be one called “floor distance.”)
I set my character at the floor location every frame (acounting for the capsule height/radius)
There’s some extra stuff you have to do to acount for hanging off ledges and for being on inclines and that’s what I’m in the middle of right now.
Digging into similar problem I stumbled upon this forum thread Still relevant on 4.12.
Quote from Epic Staff:
This small gap is there to prevent collisions as you slide across the ground or over seems between geometry. The code tries to maintain a range between 1.9 and 2.4 units (usually the average 2.15). I’m not sure why you are seeing 0.15 units instead.