mirror of
https://github.com/panda3d/panda3d.git
synced 2025-10-03 18:31:55 -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() {
|
||||
_respect_prev_transform = false;
|
||||
_respect_prev_transform = respect_prev_transform;
|
||||
#ifdef DO_COLLISION_RECORDING
|
||||
_recorder = (CollisionRecorder *)NULL;
|
||||
#endif
|
||||
|
@ -43,6 +43,14 @@ ConfigureFn(config_collide) {
|
||||
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
|
||||
// Description: Initializes the library. This must be called at
|
||||
|
@ -24,6 +24,8 @@
|
||||
|
||||
NotifyCategoryDecl(collide, EXPCL_PANDA, EXPTP_PANDA);
|
||||
|
||||
extern const bool respect_prev_transform;
|
||||
|
||||
extern EXPCL_PANDA void init_libcollide();
|
||||
|
||||
#endif
|
||||
|
Loading…
x
Reference in New Issue
Block a user