standard order of scale/translation
This commit is contained in:
1 parent
00284ae7e3
commit
76820c9888
2 files changed
+5
-1
No files matched your search
@@ -290,7 +290,7 @@ void SceneAsset::transformToUnitCube() {
|
||||
void SceneAsset::updateTransform() {
|
||||
auto &tm = _engine->getTransformManager();
|
||||
auto transform =
|
||||
math::mat4f::scaling(_scale) * _position * _rotation;
|
||||
_position * _rotation * math::mat4f::scaling(_scale);
|
||||
tm.setTransform(tm.getInstance(_asset->getRoot()), transform);
|
||||
}
|
||||
|
||||
|
||||
@@ -108,8 +108,12 @@ namespace polyvox {
|
||||
// a slot to preload textures
|
||||
filament::Texture* _texture = nullptr;
|
||||
|
||||
// initialized to identity
|
||||
math::mat4f _position;
|
||||
|
||||
// initialized to identity
|
||||
math::mat4f _rotation;
|
||||
|
||||
float _scale = 1;
|
||||
|
||||
void updateTransform();
|
||||
|
||||
Reference in new issue
Block a user