arx-tools / arx-level-generator

A node.js library for creating maps for the video game Arx Fatalis
MIT License
6 stars 0 forks source link

implement reversePolygonWinding for actual geometries, not just vertex entries in an obj file #29

Open meszaros-lajos-gyorgy opened 1 month ago

meszaros-lajos-gyorgy commented 1 month ago

currently this is the only way I can flip a mesh inside out:

loadOBJ('someobject', {
  reversedPolygonWinding: true
})

I learned from when working with the basketball map that torus geometries are for some reason render inside out in Arx, so I have to cover that up by making the polygon doublesided: https://github.com/meszaros-lajos-gyorgy/arx-map-basketball-course/blob/master/src/prefabs/hoop.ts#L18

meszaros-lajos-gyorgy commented 1 month ago

I forgot to call toArxCoordinateSystem(geometry) and that fixes the torus, but apart from that it would be nice to have this feature.