Wintermute Engine Forum

Wintermute Engine => Feature requests, suggestions => Topic started by: leucome on January 08, 2006, 02:40:11 AM

Title: Simple colision detection
Post by: leucome on January 08, 2006, 02:40:11 AM
I want to know if it could be possible to add this simple colision system into the engine ?For the 3d actor... I've tried something like that by script , and i think that could be better to be added to the engine ..I do that only on 2 axes as long as i dont use an objects who fly. I can see my scene as 2d world.

Flash sample.
http://www.harveycartel.org/metanet/tutorials/diagrams/A1_aabb-aabb_sepaxis.swf


http://www.harveycartel.org/metanet/tutorials/tutorialA.html (http://www.harveycartel.org/metanet/tutorials/tutorialA.html)

If somebody interested.... My script look like that....
Scuse me most comment are in some kind of french slang.....

function Colide_Actor(ActorA,ActorB)
{

if(ActorA.PosX - ActorB.PosX == 0 && ActorA.PosZ - ActorB.PosZ == 0) //Protection contre les Acteur au meme endroit préci...
{
   ActorA.SkipTo3D(ActorA.PosX-1, ActorA.PosY, ActorA.PosZ-1);/// Répulsion 45 degré
   ActorB.SkipTo3D(ActorB.PosX+1, ActorB.PosY, ActorB.PosZ+1);
}
else
{
///////////////////////////Le chifre qui est testé (20) représante la grandeur du caré autour de l'acteur
   if (ActorA.PosX - ActorB.PosX >= -20 && ActorA.PosX - ActorB.PosX <= 0)//// Premier quadran��
Title: Re: Simple colision detection
Post by: Mnemonic on January 09, 2006, 09:09:52 PM
Yes, I'm cooking something with the 3D actors right now, I hope to add some kind of collision detection as well.