1
0
Fork 0

Merge pull request #16326 from NathanWarden/fix_basis_mono

[Mono] Basis values now marshalled in the correct order.
This commit is contained in:
Ignacio Etcheverry 2018-02-18 19:54:53 +01:00 committed by GitHub
commit 6e200b1fe0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 6 deletions

View File

@ -452,9 +452,9 @@ namespace Godot
public Basis(float xx, float xy, float xz, float yx, float yy, float yz, float zx, float zy, float zz) public Basis(float xx, float xy, float xz, float yx, float yy, float yz, float zx, float zy, float zz)
{ {
this.x = new Vector3(xx, xy, xz); this.x = new Vector3(xx, yx, zx);
this.y = new Vector3(yx, yy, yz); this.y = new Vector3(xy, yy, zy);
this.z = new Vector3(zx, zy, zz); this.z = new Vector3(xz, yz, zz);
} }
public static Basis operator *(Basis left, Basis right) public static Basis operator *(Basis left, Basis right)

View File

@ -195,9 +195,9 @@ Dictionary mono_object_to_Dictionary(MonoObject *p_dict);
// Transform // Transform
#define MARSHALLED_OUT_Transform(m_in, m_out) real_t m_out[12] = { \ #define MARSHALLED_OUT_Transform(m_in, m_out) real_t m_out[12] = { \
m_in.basis[0].x, m_in.basis[0].y, m_in.basis[0].z, \ m_in.basis[0].x, m_in.basis[1].x, m_in.basis[2].x, \
m_in.basis[1].x, m_in.basis[1].y, m_in.basis[1].z, \ m_in.basis[0].y, m_in.basis[1].y, m_in.basis[2].y, \
m_in.basis[2].x, m_in.basis[2].y, m_in.basis[2].z, \ m_in.basis[0].z, m_in.basis[1].z, m_in.basis[2].z, \
m_in.origin.x, m_in.origin.y, m_in.origin.z \ m_in.origin.x, m_in.origin.y, m_in.origin.z \
}; };
#define MARSHALLED_IN_Transform(m_in, m_out) Transform m_out( \ #define MARSHALLED_IN_Transform(m_in, m_out) Transform m_out( \