Page 1 of 1

Me again :D

Posted: Mon Feb 19, 2007 8:49 pm
by turshija
I know I'm a real pain in the ass with all these questions and stuff but I simply want to learn new things :)

now I'm having problems and questions with collisioning ...
In tutorial 3 you have explained something about collision ... Now everything is fine when I want to detect collision between Player (sphere or something) and wall... But problem starts when I want to detect collision between 2 players ... Help when you can :)

Boris

Posted: Tue Feb 20, 2007 4:02 pm
by VilleK
Try this:

Player category 0
Wall category 1

Define collision 0 versus 1, player vs walls.
Define collision 0 vs 0, player vs player.

Then in OnCollision on PlayerModel, you test with an expression what the player have collided with.

Code: Select all

if(App.CollidedCategory==0) {
  //do something
} else if(App.CollidedCategory==1) {
  //do something else
}
Another variant would be to have separate models for Players, like
Player1Model and Player2Model with separate categories.

This forum is here to help, ask as much as you like :)