class Prism::Terrain
- Prism::Terrain
- Crash::Component
- Reference
- Object
Overview
Represents some terrain. Since things will probably travel accross this terrain you can check the height at a point on the terrain to properly position other objects.
height : Float32 = terrain.height_at(entity)
TODO This should be turned into a generic hights component, and not store the transform directly.
Defined in:
prism/stdlib/terrain.crConstructors
Instance Method Summary
-
#height_at(world_x : Float32, world_z : Float32) : Float32
Retrieves the height of the terrain at the given world position.
- #height_at(object : Prism::Entity)
- #height_at(position : Vector3f) : Float32
Constructor Detail
def self.new(heights : Array(Array(Float32)), transform : Prism::Transform, terrain_size : Float32)
#
Instance Method Detail
def height_at(world_x : Float32, world_z : Float32) : Float32
#
Retrieves the height of the terrain at the given world position.