Bullets can penetrate Higgins boat ramp and part of sides

Issue #426 resolved
Colin Basnett created an issue

The ramp is completely useless as a bullet deflector. Perhaps we could add that sexy collision addition thing? ;)

EDIT by Matt: bigger problem than just the ramp; the boat's collision is completely out of rotation and alignment with the model.

Comments (5)

  1. Matt Hands

    Yeah, this will be easy.

    For info, here is the reason why the current model doesn't work:

    The boat has a working collision box for the ramp, attached to the ramp bone, so it does hinge up and down with the ramp. The reason why it is ineffective is that there is no section of collision static mesh covering the ramp. Where a vehicle has a collision static mesh, the CSM 'sculpts' any collision boxes. A collision box without bits of collision static mesh inside it becomes useless. But if there was no CSM, the hinged ramp collision box would work fine (although the rest of the model would now have far cruder collision detection).

  2. Matt Hands

    Aaaargggghh !

    The model has been made 90 degrees rotated sideways and also out of vertical alignment. In the anim file the mesh is given a 90 degree turn, so it ends up the right way. Also a bit of pitch thrown in. And is lowered 40 UU with a translation. The pitch shows as roll and the lower shows as a raise, I guess due to the screwy rotation.

    All that makes it look and steer right. But the engine isn't applying the same rotation and offset to the collision, so the collision is in the completely wrong place. From testing it seems that the engine applies any mesh rotation/translation to the collision boxes/primitives, it doesn't apply that to a collision static mesh (I don't mean 'my' col meshes there, I mean the ones you add in the editor).

    Hits on about the middle of the boat register, but you can shoot players through the sides nearer the front and I think through the top 2 feet of the sides. The collision is basically rotated sideways and down. If you look at in in SP using "show collision" it looks ok, but that is misleading.

    The applied rotation also means that a ramp collision mesh ends up in the wrong place.

    I think it means the model needs moving and rotating and re-importing. But I think that means new anims making, unless Peter can import existing anims into Max and edit base rotation and translation. These anims are long rolling/pitching movements, combined with ramp rotation, and they are beyond me.

  3. Matt Hands

    Hang on ! Thought of a cunning wheeze. Two, actually:

    1. Remove the collision static mesh altogether. The engine seems to handle the mesh rotation/translation for collision primitives. There are collision boxes for the back, sides and floor of the boat, plus one for the ramp that is attached to the ramp hinge bone. So I think that will work. It will lose the hit detection precision of the existing col static mesh, but that's all to hell anyway, so it's 'precision' is entirely theoretical the way is now.

    2. Still leaving the col mesh out of the anim mesh, I could add one of 'my' col meshes in code and attach it to the root bone. The static mesh would be the existing col mesh; it's just the implementation that will change. I think that would probably work. If it does, I'll add the ramp mesh (I've made it) as a separate col mesh, attached to the ramp bone.

    I'll try these tomorrow.

  4. Matt Hands

    Fixed in commit f0a5238 and SVN revision 838.

    Went with the full fix option no. 2. Removed collision static mesh from anim mesh& attached boat col mesh to the relevant bone in code, as a col mesh attachment actor.

    A 2nd col mesh actor is attached to the ramp bone, to lower or raise with the ramp. This protects players inside when the ramp is up. There is a small vision slot near the top, which is modelled in the ramp col mesh and can be fired through, although it is very unlikely a player will be shot from that angle.

    All works well, but has shown me that projectiles need to handle col meshes on vehicles (rather than the more common vehicle weapons) a little differently. This is because a vehicle gets/needs a HitWall event when hit, where a VW gets/needs a Touch/ProcessTouch event.At the moment the col meshes on the Higgins and the halftrack visors don't register hit effects. It's a small change and I'll fix that next.

    Also, any looping or long animation with substantial movement, like the pitch and yaw of the boat, is going to mean the server and clients get out of collision alignment, because they will play the anims at different times. It doesn't make a huge difference and the server will still be the authoritative damage dealer, so any client misalignment only results in out of sync hit effects.

  5. Log in to comment