Collision

io.github.srs.utils.collision.Collision
object Collision

Attributes

Graph
Supertypes
class Object
trait Matchable
class Any
Self type
Collision.type

Members list

Value members

Concrete methods

def isColliding(position: Point2D, shape: Rectangle, orientation: Orientation)(otherPosition: Point2D, otherShape: ShapeType, otherOrientation: Orientation): Boolean

Checks if a rectangle is colliding with another shape.

Checks if a rectangle is colliding with another shape.

Value parameters

orientation

the orientation of the rectangle in 2D space

otherOrientation

the orientation of the other entity in 2D space

otherPosition

the position of the other shape in 2D space

otherShape

the shape of the other entity

position

the position of the rectangle in 2D space

shape

the shape of the rectangle

Attributes

Returns

true if the rectangle is colliding with the other shape, false otherwise