Skip to content

Add "collision"

Pre-release
Pre-release
Compare
Choose a tag to compare
@wybiral wybiral released this 30 Jul 21:15

This step adds a method to terrain that takes in an x, z pair and returns the corresponding y from the terrain height. This is done using bilinear interpolation and you'll find a more detailed explanation in the comments here.

The "update" method has also been modified to dispatch a custom event named "app-update". Other functions can listen for this event in order to update before the rendering phase.