12 lines
467 B
Markdown
12 lines
467 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.
|
||
|
|
||
|
##### **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.
|