QCollision test

About Monkey 2 Forums Monkey 2 Programming Help QCollision test

Tagged: ,

This topic contains 2 replies, has 1 voice, and was last updated by  Ethernaut 4 months, 2 weeks ago.

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #14979

    Ethernaut
    Participant

    I took the “QCollide” (Quake collider?) function from the Castle Mojo3d-loader demo and am trying to generalize it so that it can provide collision in an “arcade style”  (top down, side scroller, first person, etc.) movement controller that can be used in any Mojo3d model.

    It’s mostly working, but there’s some odd behavior and I can’t figure out where it’s coming from:

    • When using the capsule or box collider, horizontal collisions and vertical collisions going down slide properly along the collision surface, but vertical collisions going up get stuck
    • When using the sphere collider, upon collision the sphere jumps away from the collision object. Bug? Doesn’t look like the collision response distance is right.

    Hit space bar to change the shape, c to turn on/off collision for the shape (so that you can try colliding from outside the torus, etc.). Gravity, jumping and Z movement are disabled for now.

    Thanks!

    #14987

    Ethernaut
    Participant

    Ok, I figured why the sliding behavior depended on movement axis and fixed it. Also added more collision shapes.

    The sphere is the only one not behaving correctly, seems like a bug to me! It looks like the collision result is using the diameter value as if it’s the radius, or something like that. Will file a bug.

    Here’s the updated code. Hit space to toggle different collision shapes.

    #14988

    Ethernaut
    Participant

    Problem solved, here’s Mark’s explanation in case anyone runs into the same issue.

    https://github.com/blitz-research/monkey2/issues/402

    I hope to post the finished Character Controller eventually to the code library section, since it’s such an essential component when you’re making action games.

    Cheers.

Viewing 3 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic.