Collision on tracks with high-poly geometry

Hi!

If anybody is having problems with tank getting stuck constantly on invisible grains of sand, so to speak, a quick fix is to remove collision on track and generate new “Capsule Simplified Collision” - it’s not perfect but it allowed me to get my tank moving - it was getting constantly stuck with the standard Box/16/28DOP collision meshes.

Not a proper fix, since tank is actually hovering a bit but enough for testing if your other bits are causing the problem or not.

2 Likes

ty for sharing this fix!

Thanks, it moves much nicer with this fix and no more weird jumping

I’m having issues with movement since the switch to OnHit in lecture 182: I’m working with high poly terrain and UE 4.16.2. I switched to simple capsule collision long ago, as suggested in the forum. I can generally move around, but for some reason my tracks’ OnHit method isn’t reliably firing. Sometimes the left tracks’ OnHit fires more often than the right tracks’, sometimes it’s reversed and sometimes neither triggers anymore. This causes the tank to get stuck or not be able to turn.

I played around with different stuff for the collision but nothing really helped. It’s driving really sluggish and buggy now since the switch to using OnHit to apply force. Does anybody have an idea how to fix this? I compared the code multiple times with the one in Git, there’s no difference so I guess this is caused by a setting or an issue of the latest Engine version.

I recorded a video with the problem: https://www.dropbox.com/s/g8i6gt0tnfkwfi9/BattleTank%20-%20Unreal%20Editor%2025.06.2017%2016_04_43.mp4?dl=0

I am logging both left and right track OnHit. As you can see, the left track OnHit get’s called way more often. At the end, only the right track is suddenly called and then I got stuck and can’t move at all.

This is making the game unplayable for me :frowning:

Ok, so after some fiddling around I was able to fix the problem by doing two things:

  • Increase the force applied to both tracks from 40000000 to 50000000
  • Flatten my high poly terrain to avoid problems with collision

I also noticed that when I pressed only a single key (W for forward or A for left turn) it was working pretty fine. But when I pressed both W and A to drive forward and turn, it only drove forward and didn’t turn. This is because pressing both keys sets one track to 1 (1 + 1 clamped to 1) and the other to 0 (1 - 1 = 0). This is a general problem with the control scheme in this game which isn’t handled very gracefully. Meaning, pressing two key will only very slowly turn you (if the force is high enough which is why I increased it).

Coming back to this, I found setting the Mip Levels for Landscape collision to a higher value (meaning lowering the accuracy) improved driving by a lot (see https://docs.unrealengine.com/latest/INT/Engine/Landscape/Collision/ ). This seems to smooth out the collision experience of the tracks with the terrain.

I set both Collision Mip Level and Simple Collision Mip Level to 2.

3 Likes

Privacy & Terms