bonk-docs/content/api/SweepTest.md

479 B

title date weight
SweepTest 2020-07-18T13:07:01-07:00 30

SweepTest is a static class containing methods for performing sweep testing.

Methods

public static SweepResult Test(SpatialHash spatialHash, Rectangle rectangle, Transform2D transform, Vector2 ray) where T : IEquatable

Efficiently performs a sweep test on and against rectangles. Returns the position 1 pixel before overlap occurs. Useful for things like platforming collision.