Is it possible to disable collision for certain situations?
by Michael Layfield · in Torque Game Engine · 07/20/2005 (6:31 am) · 3 replies
Is it possible to turn off collision for certain situations?
For example: Making a team-based multiplayer FPS game wherein your character and your bullet shots can walk/fly through your teammates.
If so, how is this done?
For example: Making a team-based multiplayer FPS game wherein your character and your bullet shots can walk/fly through your teammates.
If so, how is this done?
#2
07/20/2005 (7:40 am)
The projectile will have the client who shot it in it's datablock.... from crossbow::onFire()
%p = new (%this.projectileType)() {
dataBlock = %projectile;
initialVelocity = %muzzleVelocity;
initialPosition = %obj.getMuzzlePoint(%slot);
sourceObject = %obj;
sourceSlot = %slot;
[b] client = %obj.client;[/b]
};
... If you impliment a team system you could do something like function projectile::onCollision(%this, %obj,%col){
if(%col.getTeamId() == %obj.client.getTeamId()) return;
...more code to damage enemies.
}
#3
07/21/2005 (3:57 pm)
I see, thanks a lot!
Torque Owner Stefan Lundmark