simplerr / UtopianEngine

A game engine in early development
MIT License
52 stars 5 forks source link

Investigate why coordinates are negated in lua scripts #79

Open simplerr opened 5 years ago

simplerr commented 5 years ago

In procedural_assets.lua: -get_terrain_height(-x, -z) -- Note: Negative signs

simplerr commented 5 years ago

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); } }