mirror of
https://github.com/panda3d/panda3d.git
synced 2025-10-04 10:54:24 -04:00
add respect-prev-transform Configrc variable
This commit is contained in:
parent
8611e6c881
commit
29edbb4712
@ -41,7 +41,7 @@ PStatCollector CollisionTraverser::_collisions_pcollector("App:Collisions");
|
|||||||
////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////
|
||||||
CollisionTraverser::
|
CollisionTraverser::
|
||||||
CollisionTraverser() {
|
CollisionTraverser() {
|
||||||
_respect_prev_transform = false;
|
_respect_prev_transform = respect_prev_transform;
|
||||||
#ifdef DO_COLLISION_RECORDING
|
#ifdef DO_COLLISION_RECORDING
|
||||||
_recorder = (CollisionRecorder *)NULL;
|
_recorder = (CollisionRecorder *)NULL;
|
||||||
#endif
|
#endif
|
||||||
|
@ -43,6 +43,14 @@ ConfigureFn(config_collide) {
|
|||||||
init_libcollide();
|
init_libcollide();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Set this true to have all CollisionTraversers in the world respect
|
||||||
|
// the previous frame's transform (position) for a given object when
|
||||||
|
// determining motion for collision tests. If this is false, you must
|
||||||
|
// explicitly enable motion detection for a particular traverser. It
|
||||||
|
// is false by default to force programmers to decide on a
|
||||||
|
// case-by-case basis whether they really need this feature.
|
||||||
|
const bool respect_prev_transform = config_collide.GetBool("respect-prev-transform", false);
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////
|
||||||
// Function: init_libcollide
|
// Function: init_libcollide
|
||||||
// Description: Initializes the library. This must be called at
|
// Description: Initializes the library. This must be called at
|
||||||
|
@ -24,6 +24,8 @@
|
|||||||
|
|
||||||
NotifyCategoryDecl(collide, EXPCL_PANDA, EXPTP_PANDA);
|
NotifyCategoryDecl(collide, EXPCL_PANDA, EXPTP_PANDA);
|
||||||
|
|
||||||
|
extern const bool respect_prev_transform;
|
||||||
|
|
||||||
extern EXPCL_PANDA void init_libcollide();
|
extern EXPCL_PANDA void init_libcollide();
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
Loading…
x
Reference in New Issue
Block a user