We use cookies to ensure that we give you the best experience on our website. If you continue to use this site we will assume that you are happy with it.

collision detection sizing.

Home Forums Programming collision detection sizing.

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #61808
    bigmike814
    Customer

    Hello,

    I’m working with the collision detection in the physics puzzle and have come across an issue that I know can be resolved, but I’m not sure of the best way to go about it.

    The first issue is the collision detection library is storing my object positions in the wrong way. It has y as z and also inverse.

    The other issue is that it seems to be set for a 2m x 2m cube. I am able to fix this by going in and adjusting the code in the visual_logic.js file, but I will need to use it on more than just one size, so just changing the cube won’t resolve my issue.

    // do not allow empty-sized shapes
    size.x = size.x || 0.5;
    size.y = size.y || 0.5;
    size.z = size.z || 0.5;

    if (shape == ‘BOX’) {
    var geometry = new Ammo.btBoxShape(new Ammo.btVector3(
    size.x * 0.5, size.y * .65, size.z * .9));
    } else if (shape == ‘CAPSULE’)

    It looks like the Arcade Racing game was able to assign the items and then give each item a unique size.

    `// Vehicle contants

    var chassisWidth = 1.0;
    var chassisHeight = 0.4;
    var chassisLength = 3.6;
    var massVehicle = 800;`

    But there is more going on here than what I need and am not sure on how to set it up for just the ghost collision detection.

    Here is the issue I am having. To see the issue, point the move the building to view the right wall (brown wall) and open the doors/window accordion and click the add window button (no need to select a size).

    I’m having issues uploading to the website. Will post it when I get it uploaded if it is needed.

    Thanks in advance!

    • This topic was modified 1 year, 8 months ago by bigmike814.
    • This topic was modified 1 year, 8 months ago by bigmike814.
    #61831
    #61844
    bigmike814
    Customer

    Thanks Yuri. This post got flagged as spam originally because I edited I couple times shortly after posting. So I posted again.

Viewing 3 posts - 1 through 3 (of 3 total)
  • You must be logged in to reply to this topic.