mirror of
https://github.com/minetest/irrlicht.git
synced 2025-06-30 23:30:27 +02:00
Fix coordinate system change
Old code was inverting the X axis, new code inverts the Z axis.
This commit is contained in:
committed by
JosiahWI
parent
56c4a5a945
commit
373a33a246
@ -93,12 +93,12 @@ static core::vector2df readVec2DF(const BufferOffset& readFrom)
|
||||
static core::vector3df readVec3DF(const BufferOffset& readFrom,
|
||||
const float scale = 1.0f)
|
||||
{
|
||||
// glTF coordinates are right-handed, minetest ones are left-handed
|
||||
// 1 glTF coordinate is equivalent to 10 Irrlicht coordinates
|
||||
// glTF's coordinate system is right-handed, Irrlicht's is left-handed
|
||||
// glTF's +Z axis corresponds to Irrlicht's -Z axis
|
||||
return core::vector3df(
|
||||
-scale * readPrimitive<float>(readFrom),
|
||||
scale * readPrimitive<float>(readFrom),
|
||||
scale * readPrimitive<float>(BufferOffset(readFrom, sizeof(float))),
|
||||
scale * readPrimitive<float>(BufferOffset(readFrom, 2 * sizeof(float))));
|
||||
-scale * readPrimitive<float>(BufferOffset(readFrom, 2 * sizeof(float))));
|
||||
}
|
||||
|
||||
static u16* readIndices(const BufferOffset& readFrom, const std::size_t count)
|
||||
|
Reference in New Issue
Block a user