Browse Source

Now the gripper entity doesn't have to be rotated

Signed-off-by: Paweł Budziszewski <[email protected]>
Paweł Budziszewski 2 years ago
parent
commit
fb46f3c3c7
1 changed files with 3 additions and 1 deletions
  1. 3 1
      Project/Gem/Scripts/apple_kraken_manipulator.lua

+ 3 - 1
Project/Gem/Scripts/apple_kraken_manipulator.lua

@@ -109,7 +109,6 @@ function manipulator_control:OnActivate()
     -- If true, current manipulaor state will be printed
     self.printState = true
 
-
     -- If true, apple will be retreived automatically after reaching. If false,
     -- Retrieve() function must be called.
     self.autoRetrieve = true
@@ -191,6 +190,9 @@ function manipulator_control:_getWorldPosition(target_position)
 
     TransformBus.Event.SetLocalTranslation(self.Properties.debug, pos) 
 
+    -- Gripper is not in manipulator reference - it must be rotated
+    pos = Vector3(pos['y'], pos['z'], pos['x'])
+
     return pos
 end