diff --git a/addons/Wwise/native/src/core/wwise_gdextension.cpp b/addons/Wwise/native/src/core/wwise_gdextension.cpp index 6490ed61..f151a203 100644 --- a/addons/Wwise/native/src/core/wwise_gdextension.cpp +++ b/addons/Wwise/native/src/core/wwise_gdextension.cpp @@ -1003,10 +1003,11 @@ bool Wwise::set_geometry_instance(const Object* associated_geometry, const Trans AkWorldTransform position_and_orientation{}; position_and_orientation.SetPosition(AK::ConvertAkVectorToAkVector64(position)); - position_and_orientation.SetOrientation(orientation_front * -1.0f, orientation_top); + position_and_orientation.SetOrientation(orientation_front, orientation_top); params.PositionAndOrientation = position_and_orientation; - - vector3_to_akvector(transform.get_basis().get_scale(), params.Scale); + + Vector3 scale = transform.get_basis().get_scale(); + params.Scale = { scale.x, scale.y, scale.z }; params.RoomID = associated_room ? static_cast(associated_room->get_instance_id()) : static_cast(INVALID_ROOM_ID); diff --git a/addons/Wwise/native/src/scene/ak_geometry.cpp b/addons/Wwise/native/src/scene/ak_geometry.cpp index bff42f80..81aae81a 100644 --- a/addons/Wwise/native/src/scene/ak_geometry.cpp +++ b/addons/Wwise/native/src/scene/ak_geometry.cpp @@ -53,16 +53,6 @@ void AkGeometry::_notification(int p_what, bool reversed) } } -void AkGeometry::add_indices(int a, int b, int c, int d) -{ - indices.append(a); - indices.append(c); - indices.append(d); - indices.append(a); - indices.append(b); - indices.append(c); -} - AkGeometry::AkGeometry() { acoustic_texture["name"] = ""; @@ -112,7 +102,7 @@ bool AkGeometry::set_geometry(const MeshInstance3D* mesh_instance) for (int i = 0; i < mdt->get_vertex_count(); ++i) { Vector3 vertex = mdt->get_vertex(i); - vertices.append(vertex); + vertices.append(Vector3(vertex.x, vertex.y, -vertex.z)); } for (int i = 0; i < mdt->get_face_count(); ++i) @@ -121,8 +111,8 @@ bool AkGeometry::set_geometry(const MeshInstance3D* mesh_instance) int point_1 = mdt->get_face_vertex(i, 1); int point_2 = mdt->get_face_vertex(i, 2); triangles.append(point_0); - triangles.append(point_1); triangles.append(point_2); + triangles.append(point_1); } if (!associated_room.is_empty()) diff --git a/addons/Wwise/native/src/scene/ak_geometry.h b/addons/Wwise/native/src/scene/ak_geometry.h index 3d401da5..b6e8682c 100644 --- a/addons/Wwise/native/src/scene/ak_geometry.h +++ b/addons/Wwise/native/src/scene/ak_geometry.h @@ -38,7 +38,6 @@ class AkGeometry : public Node3D Array triangles{}; MeshInstance3D* mesh_instance{}; Object* geometry_instance{}; - void add_indices(int a, int b, int c, int d); public: AkGeometry();