I wanted to use a RigidBody with a trigger collider in my project, but whenever I create a dynamic body and call myCollider->setIsTrigger(true), the program crashes on collision with another object (normal collisions without the setIsTrigger call work fine).
I've created the following simple project to demonstrate this problem:
I'm using the newest version in the master branch (at commit 4bbbaa7)
I'm compiling the program + reactphysics3d on Linux using CMake and a very simple CMakeLists.txt.
This issue only occurs when compiling the binary as a debug build (configured using cmake -DCMAKE_BUILD_TYPE=Debug ..), but works fine when compiled as a normal release build.
CMakeLists.txt:
cmake_minimum_required(VERSION 3.10)
project(Test VERSION 1.0)
set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib)
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib)
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin)
add_subdirectory(dependencies/reactphysics3d) # Contains the cloned source from GitHub
add_compile_options(-Wall)
add_executable(test src/test.cpp)
target_link_libraries(test PUBLIC reactphysics3d)
set(CMAKE_VERBOSE_MAKEFILE on)
I wanted to use a RigidBody with a trigger collider in my project, but whenever I create a dynamic body and call
myCollider->setIsTrigger(true)
, the program crashes on collision with another object (normal collisions without thesetIsTrigger
call work fine).I've created the following simple project to demonstrate this problem:
test.cpp:
I'm using the newest version in the master branch (at commit 4bbbaa7) I'm compiling the program + reactphysics3d on Linux using CMake and a very simple CMakeLists.txt.
This issue only occurs when compiling the binary as a debug build (configured using
cmake -DCMAKE_BUILD_TYPE=Debug ..
), but works fine when compiled as a normal release build.CMakeLists.txt:
The output of the program before crashing is:
Is this a bug or am I just doing something wrong when creating the bodies?