|
@@ -30,6 +30,7 @@
|
|
|
|
|
|
#include "area_bullet.h"
|
|
#include "area_bullet.h"
|
|
|
|
|
|
|
|
+#include "bullet_physics_server.h"
|
|
#include "bullet_types_converter.h"
|
|
#include "bullet_types_converter.h"
|
|
#include "bullet_utilities.h"
|
|
#include "bullet_utilities.h"
|
|
#include "collision_object_bullet.h"
|
|
#include "collision_object_bullet.h"
|
|
@@ -57,6 +58,7 @@ AreaBullet::AreaBullet() :
|
|
spOv_priority(0) {
|
|
spOv_priority(0) {
|
|
|
|
|
|
btGhost = bulletnew(btGhostObject);
|
|
btGhost = bulletnew(btGhostObject);
|
|
|
|
+ btGhost->setCollisionShape(BulletPhysicsServer::get_empty_shape());
|
|
setupBulletCollisionObject(btGhost);
|
|
setupBulletCollisionObject(btGhost);
|
|
/// Collision objects with a callback still have collision response with dynamic rigid bodies.
|
|
/// Collision objects with a callback still have collision response with dynamic rigid bodies.
|
|
/// In order to use collision objects as trigger, you have to disable the collision response.
|
|
/// In order to use collision objects as trigger, you have to disable the collision response.
|
|
@@ -162,7 +164,10 @@ bool AreaBullet::is_monitoring() const {
|
|
}
|
|
}
|
|
|
|
|
|
void AreaBullet::main_shape_resetted() {
|
|
void AreaBullet::main_shape_resetted() {
|
|
- btGhost->setCollisionShape(get_main_shape());
|
|
|
|
|
|
+ if (get_main_shape())
|
|
|
|
+ btGhost->setCollisionShape(get_main_shape());
|
|
|
|
+ else
|
|
|
|
+ btGhost->setCollisionShape(BulletPhysicsServer::get_empty_shape());
|
|
}
|
|
}
|
|
|
|
|
|
void AreaBullet::reload_body() {
|
|
void AreaBullet::reload_body() {
|