Thanks for the code brett14, im already well aware of how todo the child/parent and material idea in gml i just think the less work gm has todo the better. I just wanted to avoid having todo a giant with loop to compare the returned dll values. Will u be adding normal support in the next release? code wise it should be fairly easy to implement even in c++.
gml normal code
nx = (yy2-yy1)*(zz3-zz1) - (yy3-yy1)*(zz2-zz1);
ny = (zz2-zz1)*(xx3-xx1) - (zz3-zz1)*(xx2-xx1);
nz = (xx2-xx1)*(yy3-yy1) - (xx3-xx1)*(yy2-yy1);
m = sqrt(nx*nx + ny*ny + nz*nz);
nx /= m;
ny /= m;
nz /= m;
I agree that less gm=better, normal code probably won't be in the next release.
Okay Jepie, or anybody else that is interested. I'm just starting to plan how I'd add what you want to the dll. So far I have this idea. However there are a few "problems" with it.
Step #1: (Load/Create the models - Same as it is now)
model=p3dc_model_load("playermodel.d3d");//Load the model, working on
Step #2: Create a group
Step #3: Add the models to the group (that were created in step one)
p3dc_group_add(model3,x,y,z,ID NUMBER);//this one was needed twice
Step #4: Close/Finish making the group (the same model will be allowed in multiple groups with DIFFERENT ID's in each one (or the same)) 0 will be reserved for no collision
Step #5: Do a collision check (or ray cast) on the group and return the ID of the hit object defined in step 4. If it returns 0, nothing was hit. If it returns anything else that was the object that was hit.
hit=p3dc_group_check(group ID,Checking Args);//Group ID is returned by step 2
This is basically the layout I have for it right now. However, I have a few problems (for you to answer). How do you want to "update" the group because a player in it moved? Or would you like groups to be collections of non-moving objects with ids? How would you like to see this work?
Edited by brett14, 07 October 2009 - 04:03 AM.