openfl / away3d

An open source, real-time 3D engine for OpenFL
Apache License 2.0
208 stars 35 forks source link

Obj fix #58

Open EgguMan opened 7 months ago

EgguMan commented 7 months ago

Upon loading a .OBJ file into away 3D, it will only use the last mentioned texture in an object, defined by "o" and "usemtl"

this happens because each object can only have 1 texture, but the OBJ file attempted to load multiple textures onto 1 obj. I fixed this by instead of creating a new object on every use of the O keyword, it ignores the O keyword and will then create a new object under usemtl, then applies the texture.