QuirkyCort / gears

Generic Educational Robotics Simulator
Other
65 stars 41 forks source link

touch sensor and box #95

Closed mrfabroa closed 2 years ago

mrfabroa commented 2 years ago

I created a simple world to demonstrate touch sensor functionality to my students. I added a box for the touch sensor mounted robot to drive into. However, when the touch sensor is pushed into the box, isPressed is still false. The physics of the box is set to fixed. The touch sensor works when colliding with the world's walls. Is there a setting for the box that I've overlooked?

My World:

{
  "worldName": "custom",
  "options": {
    "imageURL": "textures/maps/grid.png",
    "groundType": "box",
    "length": 400,
    "width": 400,
    "uScale": 20,
    "vScale": 20,
    "imageScale": "2.353",
    "timer": "none",
    "timerDuration": 60,
    "timerEnd": "continue",
    "wall": true,
    "wallHeight": 10,
    "wallThickness": 5,
    "wallColor": "B3B3B3",
    "groundFriction": 1,
    "wallFriction": 0.1,
    "groundRestitution": 0,
    "wallRestitution": 0.1,
    "restartAnimationOnRun": false,
    "objects": [
      {
        "type": "box",
        "position": [
          0,
          69,
          14.999999999999998
        ],
        "rotationMode": "degrees",
        "rotation": [
          0,
          0,
          0
        ],
        "animationMode": "none",
        "animationKeys": [],
        "size": [
          38,
          16,
          30
        ],
        "modelURL": "",
        "modelScale": 10,
        "modelAnimation": "None",
        "color": "#e8457eff",
        "imageType": "repeat",
        "imageURL": "",
        "uScale": 1,
        "vScale": 1,
        "physicsOptions": "moveable",
        "magnetic": false,
        "laserDetection": "normal",
        "ultrasonicDetection": "normal",
        "receiveShadows": true,
        "castShadows": true,
        "isPickable": true
      }
    ],
    "startPos": "center",
    "startPosXYZStr": "",
    "startRotStr": "",
    "startPosXYZ": null,
    "startRot": null,
    "arenaStartPosXYZ": null,
    "arenaStartRot": null
  }
}

My robot

QuirkyCort commented 2 years ago

It's a bug on my end. There's a bug that causes the touch sensor to not register some meshes. It should be fixed now.