Skip to content

Commit

Permalink
HOTFIX-3DAttributesFor2DNodes : Done fixing 3DAttributes for 2D nodes
Browse files Browse the repository at this point in the history
This conform our repo to engine module version.
Candidate for 2.0.1 release

diff --git a/godot_fmod.cpp b/godot_fmod.cpp
index 1653d2b..185ed2a 100644
--- a/godot_fmod.cpp
+++ b/godot_fmod.cpp
@@ -146,7 +146,7 @@ void GodotFmod::setListenerAttributes() {
     if (ci != nullptr) {
         Transform2D t2d = ci->get_transform();
         Vector2 posVector = t2d.get_origin() / distanceScale;
-        Vector3 pos(posVector.x, posVector.y, 0.0f),
+        Vector3 pos(posVector.x, 0.0f, posVector.y),
                 up(0, 1, 0), forward(0, 0, 1), vel(0, 0, 0); // TODO: add doppler
         const FMOD_VECTOR &posFmodVector = toFmodVector(pos);
         auto attr = get3DAttributes(posFmodVector, toFmodVector(up), toFmodVector(forward), toFmodVector(vel));
@@ -196,7 +196,7 @@ void GodotFmod::updateInstance3DAttributes(FMOD::Studio::EventInstance *instance
         if (ci != nullptr) {
             Transform2D t2d = ci->get_transform();
             Vector2 posVector = t2d.get_origin() / distanceScale;
-            Vector3 pos(posVector.x, posVector.y, 0.0f),
+            Vector3 pos(posVector.x, 0.0f, posVector.y),
                     up(0, 1, 0), forward(0, 0, 1), vel(0, 0, 0);
             FMOD_3D_ATTRIBUTES attr = get3DAttributes(toFmodVector(pos), toFmodVector(up), toFmodVector(forward), toFmodVector(vel));
             checkErrors(instance->set3DAttributes(&attr));
  • Loading branch information
Pierre-Thomas Meisels committed Jun 18, 2019
1 parent beca430 commit 9b0208b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions godot_fmod.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ void GodotFmod::setListenerAttributes() {
if (ci != nullptr) {
Transform2D t2d = ci->get_transform();
Vector2 posVector = t2d.get_origin() / distanceScale;
Vector3 pos(posVector.x, posVector.y, 0.0f),
Vector3 pos(posVector.x, 0.0f, posVector.y),
up(0, 1, 0), forward(0, 0, 1), vel(0, 0, 0); // TODO: add doppler
const FMOD_VECTOR &posFmodVector = toFmodVector(pos);
auto attr = get3DAttributes(posFmodVector, toFmodVector(up), toFmodVector(forward), toFmodVector(vel));
Expand Down Expand Up @@ -196,7 +196,7 @@ void GodotFmod::updateInstance3DAttributes(FMOD::Studio::EventInstance *instance
if (ci != nullptr) {
Transform2D t2d = ci->get_transform();
Vector2 posVector = t2d.get_origin() / distanceScale;
Vector3 pos(posVector.x, posVector.y, 0.0f),
Vector3 pos(posVector.x, 0.0f, posVector.y),
up(0, 1, 0), forward(0, 0, 1), vel(0, 0, 0);
FMOD_3D_ATTRIBUTES attr = get3DAttributes(toFmodVector(pos), toFmodVector(up), toFmodVector(forward), toFmodVector(vel));
checkErrors(instance->set3DAttributes(&attr));
Expand Down

0 comments on commit 9b0208b

Please sign in to comment.