About Store Forum Documentation Contact



Post Reply 
Problem about Cuts(OBox,Obox)
Author Message
Amnedge1331 Offline
Member

Post: #1
Problem about Cuts(OBox,Obox)
Hi,

I don't know if i'm making something wrong but sometimes the Cuts(OBox,Obox) doesn't work. To test I draw the two OBox and I see them cuts but the Cuts function return false and its not on every OBox so.. here is a picture of 2 OBox that cuts in game but the function return false:
[Image: 926611i94cimgpshorig.png]

There is Blue and White OBox that Cuts but false is returned here is the code which test it:
Code:
REPA(itemStatic)
{
            OBox baseOo=OBox(itemStatic[i].phys->box, Matrix(itemStatic[i].pos()));
            baseOo.matrix.orn().setRotateY(itemStatic[i].matrix().orn().angles().y);
            baseOo.draw(BLUE, true);
            if(itemStatic[i].objId!=cursorObj) //This verify that we don't look the item that we want to put
            if(Cuts(tmpCursorBox, baseOo)) //tmpCursorBox is the white box on the picture
            {
               flt hauteurTmp=0.0;
               hauteurTmp=baseOo.center().y+itemStatic[i].phys->box.size().y/2;        
               if(ajoutHauteur<hauteurTmp)ajoutHauteur=hauteurTmp;
               noEnter=false;
            }
}

Thank for your help ! smile
12-16-2015 08:27 PM
Find all posts by this user Quote this message in a reply
Esenthel Offline
Administrator

Post: #2
RE: Problem about Cuts(OBox,Obox)
Hi,

Is the 'tmpCursorBox.matrix' normalized?
If yes and the problem still occurs, could you please provide a sample project (a simple version reproducing the issue), preferrably without the game objects/worlds, but just 2 OBox'es displayed on the screen.

Thank you
12-18-2015 03:04 AM
Find all posts by this user Quote this message in a reply
Post Reply