bonk-docs/content/api/SweepTest.md

14 lines
479 B
Markdown
Raw Normal View History

2020-07-18 20:13:59 +00:00
---
title: "SweepTest"
date: 2020-07-18T13:07:01-07:00
weight: 30
---
*SweepTest* is a static class containing methods for performing sweep testing.
2020-07-18 20:18:51 +00:00
## Methods
2020-07-18 20:13:59 +00:00
##### **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.