samples/04_physics_and_collisions/10_collision_with_object_removal/app/linear_collider.rb
def resetPoints(pointA,pointB)
    @pointA = pointA
    @pointB = pointB

    @pointAExtended={
      x:@pointA.x + @thickness*(@extension == :neg ? -1 : 1),
      y:@pointA.y + @thickness*(@extension == :neg ? -1 : 1)
    }
    @pointBExtended={
      x:@pointB.x + @thickness*(@extension == :neg ? -1 : 1),
      y:@pointB.y + @thickness*(@extension == :neg ? -1 : 1)
    }
  end
#thickness [float] how thick the line should be (should always be atleast as large as the magnitude of the colliding object)
thickness [float] how thick the line should be (should always be atleast as large as the magnitude of the colliding object)
thickness [ float ] how thick the line should be ( should always be atleast as large as the magnitude of the colliding object )
def resetPoints(pointA,pointB)
    @pointA = pointA
    @pointB = pointB
    @pointAExtended={
      x:@pointA.x + @thickness*(@extension == :neg ? -1 : 1),
      y:@pointA.y + @thickness*(@extension == :neg ? -1 : 1)
    }
    @pointBExtended={
      x:@pointB.x + @thickness*(@extension == :neg ? -1 : 1),
      y:@pointB.y + @thickness*(@extension == :neg ? -1 : 1)
    }
  end
def resetPoints ( pointA , pointB ) @pointA = pointA @pointB = pointB @pointAExtended = { x : @pointA . x + @thickness * ( @extension == :neg ? - 1 : 1 ) , y : @pointA . y + @thickness * ( @extension == :neg ? - 1 : 1 ) } @pointBExtended = { x : @pointB . x + @thickness * ( @extension == :neg ? - 1 : 1 ) , y : @pointB . y + @thickness * ( @extension == :neg ? - 1 : 1 ) } end
thickness [float] how thick the line should be (should always be atleast as large as the magnitude of the colliding object)
thickness [ float ] how thick the line should be ( should always be atleast as large as the magnitude of the colliding object )
pointA
pointB