Closed ColinGilbert closed 6 years ago
Raycast class header:
class noob::character_controller
{
class groundcast_callback : public rp3d::RaycastCallback
{
public:
groundcast_callback(noob::vec3 _from, noob::vec3 _to) : grounded(false), from(_from), to(_to), slope(0.0, 0.0, 0.0) {}
virtual rp3d::decimal notifyRaycastHit(const rp3d::RaycastInfo& info);
bool is_grounded() const { return grounded; }
noob::vec3 get_slope() const { return slope; }
protected:
//float cast_distance;
bool grounded;
noob::vec3 from, to, slope;
};
};
Raycast class implementation:
rp3d::decimal noob::character_controller::groundcast_callback::notifyRaycastHit(const rp3d::RaycastInfo& info)
{
grounded = true;
slope = info.worldNormal;
return 0.0;
}
Has anyone found out what exactly causes this yet?
I am currently working on the next version of the library that I expect to release this summer. I have refactored a lot of the collision detection code in order to make it faster and more robust. I also expect to fix this issue for this release.
I will try to fix this issue. However, this issue has been created about the bug happening in GJK algorithm during ray casting against a capsule shape but GJK is not used for ray casting with capsule shape. In the trace, it seams to happen during ray casting against a convex mesh instead.
Do you also observe this issue during ray casting ? Against which kind of shape?
This issue should now be fixed in the version v0.7.0 of ReactPhysics3D that has been released. Thanks a lot for reporting this.
EDIT: Forgot to add: This is on the master branch. Currently testing develop EDIT 2: Fails on develop as well. I am also raycasting every frame. Code that does raycasting on comment below.
There is a crash that occurs once in a while, usually after about a minute. I isolated it to the GJK code. Body's shape is a capsule.
Here is gdb output:
Here is a backtrace:
Full backtrace: