bonk-docs/content/api/SweepTest.md

14 lines
479 B
Markdown

---
title: "SweepTest"
date: 2020-07-18T13:07:01-07:00
weight: 30
---
*SweepTest* is a static class containing methods for performing sweep testing.
## Methods
##### **public static SweepResult<T> Test<T>(SpatialHash<T> spatialHash, Rectangle rectangle, Transform2D transform, Vector2 ray) where T : IEquatable<T>**
Efficiently performs a sweep test on and against rectangles. Returns the position 1 pixel before overlap occurs. Useful for things like platforming collision.