Game Development Community

Player collisions revisited.

by Phil Carlisle · in Torque Game Engine · 03/03/2003 (11:46 am) · 3 replies

Hi guys.

I'm having a problem with my turrets (and no, thats not the swearing disease).

when my player collides with the turret, I call the following script code:

if(%this.className $= Turret)
   {
	//if(%col.mountable)
        //{

	    echo("trying to mount Turret\n");
            %node = 0;
            %col.mountObject(%obj,%node);
            %obj.mVehicle = %col;
            %obj.client.setcontrolobject(%col);
			%obj.startfade(0,0,true);
			%obj.disableCollision();
        //}      


   }
Well, I used startfade and disablecollision to effectively make the player model I was using disappear.

However, it seems that my player is still there! :) I think its doing the disablecollision on one side of the network, but not passing that on to the other. For instance, it is disabling the client side collision for the player, but the other side is still colliding (actually, I think its vice versa because its my beamprojectile raycasts that are colliding with the invisible player).

Anyone got any clues how to:

1) Sync up the client/server collion status
2) Do it some other way (disable player)

Or just want to chit chat :))

?

Phil.

#1
03/03/2003 (12:19 pm)
If it's on the server side, you might want to have it set the 'CloakFlag' when player collisions are disabled and ensure that collision status changes are passed along to the client side in packUpdate and unpackUpdate, under that flag.

I'm not home at the moment to check out the source code.
#2
03/03/2003 (12:26 pm)
What's the cloak flag?
#3
03/03/2003 (5:07 pm)
Phil, I thought that disableCollision just disabled the ability of the player object to detect a collision... ?

Perhaps you need to delete the player object after fading it (while keeping the client around, of course). Then just respawn the player when you need it again.