Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Topics - ponut64

Pages: [1]
General Jo Engine Help / SAT / Separating Axis Theorem math: y no werk
« on: March 28, 2018, 02:27:00 am »
I have made 2 versions (well... I broke one as it is saved too late past the conversion process to the other) of some 3D collison/zone detection math using RBB [rotated bounding box] based on the separating axis theorem.

One version uses entirely FIXED data types. It generates non-zero numbers, but there are overflows due to numbers being squared (600 squared, for instance, is beyond the range of FIXED data).

One version (that can compile) I made to combat the overflows is programmed using jo_vectorf and Sint32 values and should make the final conclusion more likely/less buggy (removal of decimal points in end comparison). But there is a problem... all the numbers are zero, and I don't know why. All of the math up to slInnerProduct (replaced with jo_vectorf_dot) and JO_SQUARE (being the overflow area) worked previously, now it doesn't work at all. At some point I had that same math working with jo_vectorf and Sint32 data, but jo_vectorf_dot would not operate since this was a situation in which the vectors were not stored as pointers (and instead "stack variables" or you know, missing the * in jo_vectorf *vector_here_is_pointer_with_star ).

And the other factoid, if I remove the initialization from jo_vectorf structs, it crashes.

Here is the jo_vectorf (float/int) code that I am trying to use:

Here, for comparison, is the (broken) more-SGL-reliant code:

Thank you for reading.
The answer is probably simple. Maybe I am trying to typecast something wrong or am using jo_float2fixed and/or toFIXED improperly.

and here's the entire project

/e: thread has a conclusion

An update on March 15th had broken my jo engine compiler. I forget the error but it was about a "failed to allocate" summat.

So if you suddenly get this, 1) disable the update service and then 2) uninstall all updates you can that were installed after Mar 13.
/e: I have found it is specifically Windows 10 "Security" Update KB4088776.

Here's a youtube video of my problem

I don't want to bother you wizards too much here since I've had lots of questions before that I eventually just figured out on my own.

But on this one I really don't have any other idea of how to continue.

Using jo_3d_set_target allows me to rotate the camera's POV, but only for 180 degrees, then it appears to stop.
Which means in practical terms I can't turn the camera around to properly face the "character".

Maybe there's some tricks of translating the entire world to get it to look like it's turning around, but the math involved is too complex for me when I am already translating the world in a circle to get the camera to appear to move around the character. Now I just need to get the camera to face the character.

Pages: [1]
SMF spam blocked by CleanTalk