Collision
Client
Server
Deprecated
The collision functions in this class are old and may not correctly work.
Instead use Cast:Ray() and Collide()
Constructors
Collision Collision()
Methods
Hit[] Raycast()
Use rayPos, rayDir, returns table of Hit values or empty table for no hit. Returns Hit.
Hit[] Raycast(boolean ignoreTmp, boolean ignoreCommon, boolean precise)
Hit[] Raycast(Vec3 pos, Vec3 dir, boolean? ignoreTmp, boolean? ignoreCommon, boolean? precise)
table RaycastTo(Vec3 startPos, Vec3 endPos, boolean? readColor, boolean? readNormal, boolean? readMaterial)
Overlap[] GetOverlap(Shape? shape)
Checks collision between shape and geometry passed by filter. Returns Overlap.
Properties
Filter filter
integer maxHitCount
Doesn't influence result, just limits returned hits table size