Fiex bullet crash
This commit is contained in:
@ -30,6 +30,7 @@
|
||||
|
||||
#include "area_bullet.h"
|
||||
|
||||
#include "bullet_physics_server.h"
|
||||
#include "bullet_types_converter.h"
|
||||
#include "bullet_utilities.h"
|
||||
#include "collision_object_bullet.h"
|
||||
@ -57,6 +58,7 @@ AreaBullet::AreaBullet() :
|
||||
spOv_priority(0) {
|
||||
|
||||
btGhost = bulletnew(btGhostObject);
|
||||
btGhost->setCollisionShape(BulletPhysicsServer::get_empty_shape());
|
||||
setupBulletCollisionObject(btGhost);
|
||||
/// 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.
|
||||
@ -162,7 +164,10 @@ bool AreaBullet::is_monitoring() const {
|
||||
}
|
||||
|
||||
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() {
|
||||
|
||||
Reference in New Issue
Block a user