CollisionSystem

class CollisionSystem(var view: View)

Constructors

Link copied to clipboard
constructor(view: View)

Types

Link copied to clipboard
object Companion

Properties

Link copied to clipboard
var view: View

Functions

Link copied to clipboard
fun addCollider(collider: Collider)
Link copied to clipboard
fun destroy()
Link copied to clipboard
fun hitTest(motionEvent: MotionEvent): List<HitResult>

Tests to see if a ray is hitting any nodes within the scene.

fun hitTest(viewPosition: Float2): List<HitResult>
fun hitTest(ray: Ray): List<HitResult>

Tests to see if a ray starting from the view position is hitting any nodes within the scene and returns a list of HitResult containing all the nodes that were hit, sorted by distance.

fun hitTest(xPx: Float, yPx: Float): List<HitResult>

Tests to see if a ray starting from the screen/camera position is hitting any nodes within the scene and returns a list of HitResult containing all the nodes that were hit, sorted by distance.

Link copied to clipboard
fun intersects(collider: Collider): Collider?
Link copied to clipboard
fun intersectsAll(collider: Collider, processResult: Consumer<Collider>)
Link copied to clipboard
fun raycast(ray: Ray, resultHit: RayHit): Collider?
Link copied to clipboard
fun <T : RayHit?> raycastAll(ray: Ray, resultBuffer: ArrayList<T>, processResult: BiConsumer<T, Collider>?, allocateResult: Supplier<T>): Int
Link copied to clipboard
fun removeCollider(collider: Collider)