Game Development Community

Beta4 (fixed): mouse events broken with FlipY=1

by Alex Rice · in Torque Game Builder · 05/31/2006 (4:16 pm) · 1 replies

1. Took a static sprite and set it up to receive mouseEvents and collisions:
new t2dStaticSprite(cell) {
      imageMap = "boardTrianglePROTOImageMap";
      class = "MLEggsBoardCell";
      UseMouseEvents = "1";
      position = "-17.3177 2.7963";
      size = "17.0845 17.0845";
      Layer = "16";
      CollisionActiveReceive = "1";
      CollisionPhysicsSend = "0";
      CollisionPhysicsReceive = "0";
      CollisionLayers = "4096";
      CollisionCallback = "1";
      CollisionPolyList = "0.00 -0.87 0.51 -0.04 0.97 0.79 0.02 0.81 -0.96 0.78 -0.49 -0.05";
      BlendColor = "1 1 1 0.490196";
      LinkPoints = "-0.04 -0.16";
         mountID = "14";
   };

2. Verified that onCollision, onMouseDown, onMouseMove and onMouseDragged events are all being sent to the class MLEggsBoardCell

3. Took the same sprite, copied it, flipped it in Y with the level builder
Quote: FlipY = "1";

4. Now onCollision still works, but onMouseDown, onMouseMove and onMouseDragged are no longer being sent.

5. Undo the flipY, and onMouseDown, onMouseMove and onMouseDragged are working again.

#1
05/31/2006 (4:24 pm)
Can replicate also with CollisionPolyList removed from the sprite.