Open simplerr opened 5 years ago
In procedural_assets.lua: -get_terrain_height(-x, -z) -- Note: Negative signs
Also void InstanceGroup::UpdateAltitudes(const SharedPtr& terrain) { for (uint32_t i = 0; i < mInstances.size(); i++) { glm::vec3 translation = Math::GetTranslation(mInstances[i].world); translation.y = -terrain->GetHeight(translation.x, translation.z); mInstances[i].world = Math::SetTranslation(mInstances[i].world, translation); } }
In procedural_assets.lua: -get_terrain_height(-x, -z) -- Note: Negative signs