Help

All topics about ZGameEditor goes here.

Moderator: Moderators

Post Reply
User avatar
turshija
Posts: 127
Joined: Sat Feb 17, 2007 9:26 am
Location: Novi Sad, Serbia
Contact:

Help

Post by turshija »

I have 2 models,
Model1 is category 1...
Model2 is category 2...
i have plenty other models that are other categories (i.e. walls, floor, ceiling)...

Is there any possibility to check if Model1 is collided with Model2 ?
i know I can check App.CollidedCategory == 2 but if I check that, CollidedCategory can be = 2 if Model2 is collided with Floor, and that makes me problems ...

if there is no possibility, add some option like CheckCollision(X,Y), where it returns 1 if category X is collided with category Y...

as always, I hope you understand what I want to say ... :lol:

Cheers,
Boris
Last edited by turshija on Tue Jun 03, 2008 8:47 pm, edited 1 time in total.
User avatar
turshija
Posts: 127
Joined: Sat Feb 17, 2007 9:26 am
Location: Novi Sad, Serbia
Contact:

Post by turshija »

or maybe add option to check if DefineCollision is active ...

For example i have DefineCollision "Model1 VS Model2" named col1, DefineCollision "Model1 vs Floor" named col2, and while first collision (Model1 vs Model2) is active, put col1 to 1, else put it to 0, then we will be able to check whether collision is active or not ...
Cheers,
Boris
User avatar
VilleK
Site Admin
Posts: 2277
Joined: Mon Jan 15, 2007 4:50 pm
Location: Stockholm, Sweden
Contact:

Re: Help

Post by VilleK »

turshija wrote:Is there any possibility to check if Model1 is collided with Model2 ?
i know I can check App.CollidedCategory == 2 but if I check that, CollidedCategory can be = 2 if Model2 is collided with Floor, and that makes me problems ...
In Model1.OnCollision test for App.CollidedCategory == 2. If I understand you correctly this should only be true when Model1 and Model2 collides.
User avatar
turshija
Posts: 127
Joined: Sat Feb 17, 2007 9:26 am
Location: Novi Sad, Serbia
Contact:

Re: Help

Post by turshija »

VilleK wrote:In Model1.OnCollision test for App.CollidedCategory == 2. If I understand you correctly this should only be true when Model1 and Model2 collides.
yes, but that will be true even if Model2 collides with something else (i.e wall or Model3) without touching Model1 ...
User avatar
VilleK
Site Admin
Posts: 2277
Joined: Mon Jan 15, 2007 4:50 pm
Location: Stockholm, Sweden
Contact:

Post by VilleK »

No, not if you test for it in Model1.OnCollision :)
User avatar
turshija
Posts: 127
Joined: Sat Feb 17, 2007 9:26 am
Location: Novi Sad, Serbia
Contact:

Post by turshija »

oh thanks ...
ill try that ... :)
Post Reply