Fix issue with display of contact points in testbed application
This commit is contained in:
parent
eccc4faa6d
commit
112253cb81
|
@ -189,9 +189,6 @@ void Scene::rotate(int xMouse, int yMouse) {
|
||||||
// Called when some contacts occur
|
// Called when some contacts occur
|
||||||
void Scene::onContact(const rp3d::CollisionCallback::CallbackData& callbackData) {
|
void Scene::onContact(const rp3d::CollisionCallback::CallbackData& callbackData) {
|
||||||
|
|
||||||
// Clear contacts points
|
|
||||||
mContactPoints.clear();
|
|
||||||
|
|
||||||
// For each contact pair
|
// For each contact pair
|
||||||
for (uint p=0; p < callbackData.getNbContactPairs(); p++) {
|
for (uint p=0; p < callbackData.getNbContactPairs(); p++) {
|
||||||
|
|
||||||
|
|
|
@ -124,6 +124,9 @@ void SceneDemo::update() {
|
||||||
// Can be called several times per frame
|
// Can be called several times per frame
|
||||||
void SceneDemo::updatePhysics() {
|
void SceneDemo::updatePhysics() {
|
||||||
|
|
||||||
|
// Clear contacts points
|
||||||
|
mContactPoints.clear();
|
||||||
|
|
||||||
if (getDynamicsWorld() != nullptr) {
|
if (getDynamicsWorld() != nullptr) {
|
||||||
|
|
||||||
// Take a simulation step
|
// Take a simulation step
|
||||||
|
|
Loading…
Reference in New Issue
Block a user