aboutsummaryrefslogtreecommitdiff
path: root/PhysX_3.4/Documentation/PhysXGuide/_sources/Manual/OriginShift.txt
diff options
context:
space:
mode:
authorgit perforce import user <a@b>2016-10-25 12:29:14 -0600
committerSheikh Dawood Abdul Ajees <Sheikh Dawood Abdul Ajees>2016-10-25 18:56:37 -0500
commit3dfe2108cfab31ba3ee5527e217d0d8e99a51162 (patch)
treefa6485c169e50d7415a651bf838f5bcd0fd3bfbd /PhysX_3.4/Documentation/PhysXGuide/_sources/Manual/OriginShift.txt
downloadphysx-3.4-3dfe2108cfab31ba3ee5527e217d0d8e99a51162.tar.xz
physx-3.4-3dfe2108cfab31ba3ee5527e217d0d8e99a51162.zip
Initial commit:
PhysX 3.4.0 Update @ 21294896 APEX 1.4.0 Update @ 21275617 [CL 21300167]
Diffstat (limited to 'PhysX_3.4/Documentation/PhysXGuide/_sources/Manual/OriginShift.txt')
-rw-r--r--PhysX_3.4/Documentation/PhysXGuide/_sources/Manual/OriginShift.txt19
1 files changed, 19 insertions, 0 deletions
diff --git a/PhysX_3.4/Documentation/PhysXGuide/_sources/Manual/OriginShift.txt b/PhysX_3.4/Documentation/PhysXGuide/_sources/Manual/OriginShift.txt
new file mode 100644
index 00000000..ff3f3c1a
--- /dev/null
+++ b/PhysX_3.4/Documentation/PhysXGuide/_sources/Manual/OriginShift.txt
@@ -0,0 +1,19 @@
+.. _originshift:
+
+------------
+Scene Origin
+------------
+
+The further away objects move from the origin, the larger the chance to suffer from floating point precision issues. This can cause troubles especially in scenarios with big game worlds. To avoid these problems, a straightforward solution seems to teleport all objects towards the origin in certain intervals. However, this is not only cumbersome but can also be pretty expensive due to the invalidation of cached data and persistent state. To address some of these issues, PhysX offers an API to shift the origin of a scene.
+
+=========================
+Shifting The Scene Origin
+=========================
+
+The following method will shift the origin of a scene by a translation vector::
+
+ PxScene::shiftOrigin(const PxVec3& shift)
+
+The positions of all objects in the scene and the corresponding data structures will get adjusted to reflect the new origin location (basically, the shift vector will get subtracted from all object positions). The intended use pattern for this API is to shift the origin such that object positions move closer towards zero. Please note that it is the user's responsibility to keep track of the summed total origin shift and adjust all input/output to/from PhysX accordingly.
+Even though this method preserves some of the internally cached data, it is still an expensive operation and we recommend to use it only in the case where distance related precision issues may arise in areas far from the origin.
+If extension modules of PhysX are used like the character controller or vehicle library, then it will be necessary to propagate the scene shift to those modules as well. Please refer to the API documentation of these modules for details.