That way I can have, for example, a lot of bullets not affected by the world and having no step event acting out on a real world object. I simply use GM's collision event as a pre-check for collision and apply the collision in the system... Which may or may not result in a real collision in the system, depending if the fake object, given the setting, would actually collide with the real one. Hope the paragraph is clear enough.
So bullet's actualy push the other player? Now thts cool
Il certainly add such a function. And 'ok' to the worldScale and degree-based angles, and I'l make sure there are some addVeclocity functions (and wherever else such type of functions would be applicable, eg; an addGravity too.)
Don’t want to be thorn on your side here. But you see how this can be useful in a top down setting for a 2d or 3d game you don’t want the z or xr,yr to change.
Actualy, I encountered that as soon as I started toying with it in GM, so I added the option of specifying a Null-collision shape when creating a rigid body, with that you can use a constraint to limit motion to 2D:
nullBody=GMBULLET_AddRigidBody(0,0,-1,0,0,0,0,0,0,0,0,0,0); //Create a static non-colliding body at the origin
t(playerBody,0,0,0,0,0,0,0,1,1); //Create a 6DOF constraint between your 2D object and the null body
GMBULLET_Set6DOFLimit(playerConstraint,0,1,0); //Unlock the x
GMBULLET_Set6DOFLimit(playerConstraint,1,1,0); // and y axis
GMBULLET_Set6DOFLimit(playerConstraint,2,0,0); //Lock the Z axis
GMBULLET_Set6DOFLimit(playerConstraint,3,0,0);//Lock rotation about x
GMBULLET_Set6DOFLimit(playerConstraint,4,0,0);// and y axis
GMBULLET_Set6DOFLimit(playerConstraint,5,0,0); //Optional: lock, limit, or free rotation about the z-axis.
Il add a "2D" constraint though, for simplicity, which will do that for you.
Now, I'm not sure which primitives have the most efficient collision algorithm, as each one has it's own, but I think the boxes and spheres are the best (most likely sphere's are the most efficient.) I can tell you that triangle meshes would be the slowest.
to make a coumpound shape,
GMBULLET_StartCompoundShape, to begin
Add child shapes with GMBULLET_AddToCompoundShape, specifying thier location and orientation within the compound shape. Note that the child shapes need to stay alive as long as the compound shape is. Thus, if you add a box shape, then create a compound shape and add that box as a child, you can't delete the box untill you delete the compound shape (or rather, you CAN delete the box, but your going to get an access violation and crash the game next time you step the simulation.)
Finally, GMBULLET_FinishCompoundShape will return the Shape ID of your new compound shape.
Quick fun: You can nest calls of Start and Finish compound shape, just like you can with curly brackets in code. If you add a compound shape in this manner, it is always added to the most recently started, and still-unfinished, shape.
Anyway, thank you for all the feedback icuurd, it has been very helpfull.
The start triangle mesh functions are there only if you want to manualy add the faces for a tri-mesh. The model loading functions take care of all that buisness for you however, so you need not wory about them.
Instead, to load a 3DS model, which will be stored as a Shape, first call Load3DS as you have done.
This function will return the number of meshes that it found in the 3DS shape (this function is set up so you can load multiples meshes from a single 3DS.)
If you know that this model only has 1 mesh, the next part is quite simple:
just call gmb3DSGetNextMeshShape(0,MeshType)
Where MeshType is either 0 for a convex mesh, 1 for a non-moving concave, or 2 for a moving concave.
0 is fastest, but your sacrificing accuracy for speed. 1 is the second fastest, but you can only use it on static objects (type 0,) 2 is for the rest.
It returns a ShapeID which you can use to make a rigid body with.
Also, I'd like to see a description of what the script does inside GM, not just in the help-file. That would make this much easier to use.
What do you mean by that? As in an example of what each function does?
Finally, thanks Luenardi, glad yo hear you like it!