Game Development Community

Projectile Collision with Items

by University of Zurich (#0001) · in Torque Game Engine · 12/06/2007 (4:53 am) · 1 replies

Hi, I'm using this Ressource for our Game:
www.garagegames.com/index.php?sec=mg&mod=resource&page=view&qid=3798

All I need is projectile collision for Items, because we're using the Projectile to identify the objects, the player looks at. Some of them have to be Items.

I integrated this modification into the engine (we're using 1.52) and compiled it without any errors:


torque\engine\game\projectile.cc

Change csmDynamicCollisionMask to include ItemObjectType as shown in the following block of code.

const U32 Projectile::csmDynamicCollisionMask = PlayerObjectType |
VehicleObjectType |
ItemObjectType | // RFB -> adding items to this damage mask
DamagableItemObjectType;

But the onCollision function of the projectile still has no Items in the %obj var. All other Objects work fine.

Hope that someone can help, would be really important to get this fixed.

Thanks!

#1
12/06/2007 (8:19 am)
Well, now it works.
Resource ist correct....