Raydium 3D Game Engine

Official forum for everything about Raydium, ManiaDrive, MeMak, ...
It is currently Sat Nov 18, 2017 5:24 pm

All times are UTC




Post new topic Reply to topic  [ 5 posts ] 
Author Message
PostPosted: Wed Jan 19, 2011 9:26 pm 
Offline

Joined: Sun Oct 09, 2005 10:46 pm
Posts: 759
Hello,

Ode dRFromEulerAngles seems to work on transpose RzRyRx rotation matrix.
So raydium_ode_element_rot_get dont return correct angle.

It is possible to correct this :
Code:
    if(matrix[2] < 1-epsilon && matrix[2] > -1+epsilon)
    {
        *ry=-asin(matrix[2]);
        c=cos(*ry);
        *rx= atan2(matrix[6]/c,matrix[10]/c);
        *rz= atan2(matrix[1]/c,matrix[0]/c);
    }
    else
    {
        *rz=0;
        *ry=-atan2(matrix[2],0);
        *rx= atan2(-matrix[9],matrix[5]);
    }


Hope this will not impact project, or just revert it.

Have a nice day.
Ouille.


Top
 Profile  
 
PostPosted: Thu Jan 20, 2011 8:49 am 
Offline
User avatar

Joined: Sun Mar 16, 2003 2:53 am
Posts: 2590
Location: gnniiiii (Scrat)
Hi,

No problem, this function is tagged as "experimental" in the doc (and perhaps should we remove this note now ?) and therefore not used in any project, I think. Or at least, we could assume that it's not used ... and anyway, none of our official application in the trunk use it :)

Thank for this fix !


Top
 Profile  
 
PostPosted: Thu Jan 20, 2011 4:50 pm 
Offline

Joined: Sun Oct 09, 2005 10:46 pm
Posts: 759
Hello,

Revision 1046 is the stupidiest commit since a long period.

Raydium function is correct, and ode isn't, i don't know why i changed raydium.

In fact the correct solution is to change raydium_ode_element_rotate_name_3f and create the right matrix and thus don't use ode euler function.

I'll correct this soon.

Sorry :(

Have a nice day.
Ouille


Top
 Profile  
 
PostPosted: Thu Jan 20, 2011 8:28 pm 
Offline
User avatar

Joined: Sun Mar 16, 2003 2:53 am
Posts: 2590
Location: gnniiiii (Scrat)
Not sure to get the whole thing but, be careful, raydium_ode_element_rotate* functions are used here and there (quick search on official files: ragdoll.c, skydiver.c, test6), so applying changes will probably break compatibility.


Top
 Profile  
 
PostPosted: Wed Jan 18, 2012 6:13 pm 
Offline
User avatar

Joined: Sun Mar 16, 2003 2:53 am
Posts: 2590
Location: gnniiiii (Scrat)
... speaking of which :)

I've just seen that explo.c and train.c seems broken (a bit) by commit r1100 (rotation function changes). This was more or less predictable (as seen in the commit comment, "Please test, as some functions may have change its own behaviour").

I've not investigated yet, just wanted to report this somewhere. Some other demos may be broken, I've not tested everything.

Soon, more to come on this topic ! :)


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 5 posts ] 

All times are UTC


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB® Forum Software © phpBB Group