Hi Sylvain,
thanks for your answer. Unfortunately I cannot get this method to work correctly. I have searched the forum an found only two other posts concerning MousePickEx. One of it seems to be broken (theres just a blank page coming up) and the other one describes my problem with the method - but there is no answer to it.
The Problem is that iNumberOfHits is always returned as 0, no matter if a collision has happened or not. Also the array of CollisionResult-Structs seems to remain untouched. However, the bool returnvalue seems to work, it detects collisions. I'm using C#, could that cause the problem? Or maybe I'm doing something wrong. Here is my quick textcode:
int numHits = 5;
TV_COLLISIONRESULT[] collisions = new TV_COLLISIONRESULT[numHits];
// just a test if there is any change if the structs are creatd with "constructor" (but there is no change)
//for(int i=0; i<numHits; i++)
//{
// collisions[i] = new TV_COLLISIONRESULT();
//}
bool hitDetected = engine.Scene.MousePickEx(mouseCollDetectX, mouseCollDetectY, ref collisions[0], (int)CONST_TV_OBJECT_TYPE.TV_OBJECT_MESH, CONST_TV_TESTTYPE.TV_TESTTYPE_BOUNDINGBOX, ref numHits);
Is there another way to pass the first element of the struct-array (I got no pinters in C# :-). Can anyone see any errors here?
Many thanks again,
Biertuebl