RandyGaul/qu3e

Position of collision objects being null

Closed this issue · 21 comments

The title. I have tried creating a new scene when this is detected but it still isnt working.

What are you trying to do? I don't understand

I don't think I'm doing anything out of the ordinary. I can send a dump this time though. It happens about every 20 times when openning my game. But the position of my objects becomes null. I've tried deleting the body and replacing it, I've tried deleting the scene and replacing it. However nothing seems to help. I wanted to know if anything could cause this to happen

Oh that sounds bad. Sure try sending a dump and maybe I can see what's happening?

Ok I have spent the last 2 days trying to get a dump of the problem. The problem is whenever it either crashes or I have the problem, the dump feature just does not work. I am on ubuntu and I have an amd cpu if that effects anything

Well I think the only way for me to help would be to understand how to get it to crash on my machine so I can debug it with Visual Studio.

I’m sorry you’re running into a problem! Without any way for me to reproduce the problem I currently can not help :(

I used gdb and got

a.out: /home/rory/Desktop/qu3e-master/src/math/q3Quaternion.cpp:67: void q3Quaternion::ToAxisAngle(q3Vec3*, r32*) const: Assertion `w <= r32( 1.0 )' failed.
Aborted (core dumped)

when I tried to dump the project

Oh interesting! That’s a great hint. Looks like I might have missed a numeric sensitivity. I’ll try to take a look soon!

Hmm I'd have to get a reproduction on my machine to debug this. What are the steps I can do to trigger this bug?

Im trying to get a reproduction

My theory however is that it happens every so often when a dynamic object is teleported to be inside a static object. Im still testing though

This probably happens when boxes are perfectly aligned and there’s a zero cross product, or something like this.

Interesting. I am not to familiar with 3d collision, im still trying to make a reproduction however I may have figured it out. What I just did was delete the object that the player is spawned inside of. Usually the player is just pushed out however every so often it seems to glitch out

Still testing tho

Some things to try: player spawns with the center on the center of a pre-existing shape. Player spawns with one face of the box laying perfectly on the face of another box. Two edges of two boxes perfectly touching.

These are things I don’t remember diligently testing when I made qu3e, but I should have!

I believe because the top and bottem faces are touching it may be what causes this

bottom*

Is there any way to test for this?

If you setup either a test that triggers the bug, or a snapshot that triggers the bug, and post back here, I will debug it!

I am struggling to find a common thread between what is causing this. I have tried to see what happens when a dynamic mesh is in the exact same position as a static mesh, but that didn't trigger it. Some info I do have that is that I have gravityScale set to 0 and I always have one static mesh and one dynamic mesh

I just changed some stuff about how I got collision boxes from meshes, and I found out every so often the mesh sizes were null. I fixed this and then I don't seem to have the problem anymore. However I am hesitant to close this because the moment this bug seems to disappear, I change some random small thing that should have nothing to do with collision, and then this bug comes back.

wait nope I just got the error again

wait the error is gone now

Looks like you've figured it out on your end? Closing this for now. Feel free to comment more or re-open if needed :)