Game Development Community

Missing collisions with powerup items

by Matthew Cooke · in Torque Game Engine · 04/04/2004 (10:41 am) · 0 replies

Hello, I seem to be having lots of problems with collisions, ones that happen when they're not supposed to, and in this case ones that don't when they should.

I have added some custom code for powerups. And every once in a while, if I collect a power up and then die. I cannot pick up the powerup when it has respawned. I can pick up other powerups but not the one that I picked up before I died.

It is not an powerup/item/inventory problem as far as I can tell. Tracking back through the code it doesn't even get as far as Armor::onCollision, which as far as I can tell (I'm not too hot on C++ yet) is the point where the engine interfaces with the script.

The thing I've been playing with elsewhere in my modified scripts. Is the %client.player arangement. The client starts off as a PathCamera, then the game starts, the path camera is deleted and the player spawned. Does this sound like it could be the problem?

I also have found that when I can't pick up the powerups, calling the following from the console, fixes the problem

ClientGroup.getObject(0).setTransform("MissionGroup/teleportTo".getTransform());

I will post my powerup code if requested but I think the problem is deeper than that.

Many thanks
Matt