tmGroundProbe

Category: Tilemap — Following ground

Syntax:

tmGroundProbe:Int(map:Int, layer:Int, x:Double, y:Double, angle:Double, radius:Int, foot:Int, from:Int, reach:Int, flags:Int)


Parameters

Returns

1 if it finds ground, otherwise 0.



Summary

Finds the ground under a round body, for slopes, curves and loops. Two feet, one each side of the middle, look "down" for the body's angle. tmGroundX and tmGroundY then say where the body's centre belongs, and tmGroundAngle gives the ground's angle. The SpeedLevel example shows it in use.

See the Tilemaps guide.



Example
If tmGroundProbe(map, plane, x, y, angle, 12, 8, 0, 24, 0) Then
    x = tmGroundX()
    y = tmGroundY()
    angle = tmGroundAngle()
EndIf

BambooBasic © 2026 Michael Denathorn