浏览代码

Should improve manipulator stability

Signed-off-by: Paweł Budziszewski <[email protected]>
Paweł Budziszewski 2 年之前
父节点
当前提交
d391e5f36d

+ 34 - 34
Project/Assets/Importer/apple_kraken_5.prefab

@@ -77,8 +77,8 @@
                         ]
                         ]
                     },
                     },
                     "PhysXSpecificConfiguration": {
                     "PhysXSpecificConfiguration": {
-                        "SolverPositionIterations": 20,
-                        "SolverVelocityIterations": 5
+                        "SolverPositionIterations": 40,
+                        "SolverVelocityIterations": 15
                     }
                     }
                 },
                 },
                 "Component_[10756722832465606112]": {
                 "Component_[10756722832465606112]": {
@@ -347,8 +347,8 @@
                         ]
                         ]
                     },
                     },
                     "PhysXSpecificConfiguration": {
                     "PhysXSpecificConfiguration": {
-                        "SolverPositionIterations": 20,
-                        "SolverVelocityIterations": 5
+                        "SolverPositionIterations": 40,
+                        "SolverVelocityIterations": 15
                     }
                     }
                 },
                 },
                 "Component_[8160934721586853298]": {
                 "Component_[8160934721586853298]": {
@@ -506,8 +506,8 @@
                         "Compute inertia": false
                         "Compute inertia": false
                     },
                     },
                     "PhysXSpecificConfiguration": {
                     "PhysXSpecificConfiguration": {
-                        "SolverPositionIterations": 20,
-                        "SolverVelocityIterations": 5
+                        "SolverPositionIterations": 40,
+                        "SolverVelocityIterations": 15
                     }
                     }
                 },
                 },
                 "Component_[16133372995322410612]": {
                 "Component_[16133372995322410612]": {
@@ -959,8 +959,8 @@
                         ]
                         ]
                     },
                     },
                     "PhysXSpecificConfiguration": {
                     "PhysXSpecificConfiguration": {
-                        "SolverPositionIterations": 20,
-                        "SolverVelocityIterations": 5
+                        "SolverPositionIterations": 40,
+                        "SolverVelocityIterations": 15
                     }
                     }
                 },
                 },
                 "Component_[8801526189808124059]": {
                 "Component_[8801526189808124059]": {
@@ -1124,8 +1124,8 @@
                         "Compute inertia": false
                         "Compute inertia": false
                     },
                     },
                     "PhysXSpecificConfiguration": {
                     "PhysXSpecificConfiguration": {
-                        "SolverPositionIterations": 20,
-                        "SolverVelocityIterations": 5
+                        "SolverPositionIterations": 40,
+                        "SolverVelocityIterations": 15
                     }
                     }
                 },
                 },
                 "Component_[6492306332728591622]": {
                 "Component_[6492306332728591622]": {
@@ -1353,8 +1353,8 @@
                         ]
                         ]
                     },
                     },
                     "PhysXSpecificConfiguration": {
                     "PhysXSpecificConfiguration": {
-                        "SolverPositionIterations": 20,
-                        "SolverVelocityIterations": 5
+                        "SolverPositionIterations": 40,
+                        "SolverVelocityIterations": 15
                     }
                     }
                 },
                 },
                 "Component_[5537772980649449717]": {
                 "Component_[5537772980649449717]": {
@@ -1874,8 +1874,8 @@
                         ]
                         ]
                     },
                     },
                     "PhysXSpecificConfiguration": {
                     "PhysXSpecificConfiguration": {
-                        "SolverPositionIterations": 20,
-                        "SolverVelocityIterations": 5
+                        "SolverPositionIterations": 40,
+                        "SolverVelocityIterations": 15
                     }
                     }
                 },
                 },
                 "Component_[9976445161209749090]": {
                 "Component_[9976445161209749090]": {
@@ -2032,8 +2032,8 @@
                         ]
                         ]
                     },
                     },
                     "PhysXSpecificConfiguration": {
                     "PhysXSpecificConfiguration": {
-                        "SolverPositionIterations": 20,
-                        "SolverVelocityIterations": 5
+                        "SolverPositionIterations": 40,
+                        "SolverVelocityIterations": 15
                     }
                     }
                 }
                 }
             }
             }
@@ -2246,8 +2246,8 @@
                         ]
                         ]
                     },
                     },
                     "PhysXSpecificConfiguration": {
                     "PhysXSpecificConfiguration": {
-                        "SolverPositionIterations": 20,
-                        "SolverVelocityIterations": 5
+                        "SolverPositionIterations": 40,
+                        "SolverVelocityIterations": 15
                     }
                     }
                 },
                 },
                 "Component_[3377818137773634105]": {
                 "Component_[3377818137773634105]": {
@@ -2497,12 +2497,11 @@
                         },
                         },
                         "DriveModel": {
                         "DriveModel": {
                             "SteeringPID": {
                             "SteeringPID": {
-                                "P": 1000.0,
+                                "P": 0.0,
                                 "Output limit": 200.0
                                 "Output limit": 200.0
                             },
                             },
                             "SpeedPID": {
                             "SpeedPID": {
-                                "P": 250.0,
-                                "I": 150.0,
+                                "P": 0.0,
                                 "IMax": 500.0,
                                 "IMax": 500.0,
                                 "Anti windup": true,
                                 "Anti windup": true,
                                 "Output limit": 500.0
                                 "Output limit": 500.0
@@ -2631,8 +2630,8 @@
                         ]
                         ]
                     },
                     },
                     "PhysXSpecificConfiguration": {
                     "PhysXSpecificConfiguration": {
-                        "SolverPositionIterations": 20,
-                        "SolverVelocityIterations": 5
+                        "SolverPositionIterations": 40,
+                        "SolverVelocityIterations": 15
                     }
                     }
                 },
                 },
                 "Component_[583585224453152908]": {
                 "Component_[583585224453152908]": {
@@ -2903,8 +2902,8 @@
                         ]
                         ]
                     },
                     },
                     "PhysXSpecificConfiguration": {
                     "PhysXSpecificConfiguration": {
-                        "SolverPositionIterations": 20,
-                        "SolverVelocityIterations": 5
+                        "SolverPositionIterations": 40,
+                        "SolverVelocityIterations": 15
                     }
                     }
                 },
                 },
                 "Component_[5405192070174247494]": {
                 "Component_[5405192070174247494]": {
@@ -3061,8 +3060,8 @@
                         "Compute inertia": false
                         "Compute inertia": false
                     },
                     },
                     "PhysXSpecificConfiguration": {
                     "PhysXSpecificConfiguration": {
-                        "SolverPositionIterations": 20,
-                        "SolverVelocityIterations": 5
+                        "SolverPositionIterations": 40,
+                        "SolverVelocityIterations": 15
                     }
                     }
                 }
                 }
             }
             }
@@ -3432,7 +3431,8 @@
                     "Id": 12122484710959107959,
                     "Id": 12122484710959107959,
                     "Controller": {
                     "Controller": {
                         "Configuration": {
                         "Configuration": {
-                            "EditorEntityId": 11896589052357720660
+                            "Field of View": 60.0,
+                            "EditorEntityId": 15301095322561096953
                         }
                         }
                     }
                     }
                 },
                 },
@@ -3450,14 +3450,14 @@
                     "Parent Entity": "Entity_[126373983206044]",
                     "Parent Entity": "Entity_[126373983206044]",
                     "Transform Data": {
                     "Transform Data": {
                         "Translate": [
                         "Translate": [
-                            -3.0,
-                            0.0,
-                            4.0
+                            -2.1134719848632813,
+                            -1.2919998168945313,
+                            1.685793399810791
                         ],
                         ],
                         "Rotate": [
                         "Rotate": [
-                            0.0,
-                            20.0,
-                            -90.0
+                            -0.025364583358168602,
+                            2.044806480407715,
+                            -89.28924560546875
                         ]
                         ]
                     }
                     }
                 },
                 },

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

@@ -127,7 +127,7 @@ function manipulator_control:OnActivate()
     self.InputNotificationBus = InputEventNotificationBus.Connect(self, InputEventNotificationId("manipulator_keyboard_control"))
     self.InputNotificationBus = InputEventNotificationBus.Connect(self, InputEventNotificationId("manipulator_keyboard_control"))
 
 
     self.pid1 = PID.new(300.0, 0.0, 0.0, self.max_velocity['z']) 
     self.pid1 = PID.new(300.0, 0.0, 0.0, self.max_velocity['z']) 
-    self.pid2 = PID.new(400.0, 0.0, 0.0, self.max_velocity['x']) 
+    self.pid2 = PID.new(200.0, 0.0, 0.0, self.max_velocity['x']) 
     self.pid3 = PID.new(100.0, 0.0, 0.0, self.max_velocity['y'])
     self.pid3 = PID.new(100.0, 0.0, 0.0, self.max_velocity['y'])
     self.pid4 = PID.new(100.0, 0.0, 0.0, self.max_velocity['y'])
     self.pid4 = PID.new(100.0, 0.0, 0.0, self.max_velocity['y'])
     self.gravityThreshold = 0.0
     self.gravityThreshold = 0.0

+ 2 - 1
Project/Registry/physxsystemconfiguration.setreg

@@ -3,7 +3,8 @@
         "Gems": {
         "Gems": {
             "PhysX": {
             "PhysX": {
                 "PhysXSystemConfiguration": {
                 "PhysXSystemConfiguration": {
-                    "FixedTimeStep": 0.009999999776482582,
+                    "MaxTimestep": 0.07000000029802322,
+                    "FixedTimeStep": 0.007000000216066837,
                     "OverlapBufferSize": 256,
                     "OverlapBufferSize": 256,
                     "CollisionConfig": {
                     "CollisionConfig": {
                         "Layers": {
                         "Layers": {