Hm....my attempts to change the collision rules don't seem to change anything. I set my projectile up as follows:
pBullet->SetMoveType( MOVETYPE_FLYGRAVITY, MOVECOLLIDE_FLY_CUSTOM ); pBullet->SetCollisionGroup(COLLISION_GROUP_PROJECTILE );
Then in ShouldCollide() in both the sdk_gamerules.cpp and in gamesrules.cpp I set it to always return false if one of the objects in the collision is of COLLISION_GROUP_PROJECTILE.
However, my projectiles collide with everything. I tried changing to AddSolidFlags( FSOLID_NOT_SOLID ); but still, they collide with everything.
very confused, suicide
Jay Stelly wrote:
COLLISION_GROUP_NONE is the default collision group. These collide with everything. Other collision groups have special rules. E.g. COLLISION_GROUP_DEBRIS doesn't collide with other COLLISION_GROUP_DEBRIS.
In the end, collision group is simply an id. The behavior of it is controlled by the mod's implementation of gamerules' ShouldCollide() function. In there you specific whether any pair of collision groups collides with each other. So you can make it do anything you want.
If you don't want an entity to have any collision, you set the solid flag FSOLID_NOT_SOLID. AddSolidFlags( FSOLID_NOT_SOLID );
-----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Hasan Aljudy Sent: Friday, January 07, 2005 8:37 PM To: [email protected] Subject: Re: [hlcoders] Movetypes and CollisionTypes
I don't know what's the deal with collision groups, but it seems when you put COLLISION_GROUP_NONE in a traceline it hits everything :/
On Fri, 07 Jan 2005 18:09:35 -0800, SuicideCommando <[EMAIL PROTECTED]> wrote:
I'm trying to model bullets as projectiles. I based my bullet class off of CBaseEntity. I can get them to move correctly, but
I'm having
trouble with the collisions. I set the bullets as SetMoveType( MOVETYPE_FLYGRAVITY, MOVECOLLIDE_FLY_CUSTOM ); SetCollisionGroup(COLLISION_GROUP_NONE); thinking they would fly as projectiles, but not have any collisions set up. Instead, they fly straight thru the ground on the test map, but stick to objects (the hills and rocks). Anyone know why
it's doing this?
thanks, suicide
_______________________________________________ To unsubscribe, edit your list preferences, or view the
list archives, please visit:
http://list.valvesoftware.com/mailman/listinfo/hlcoders
_______________________________________________ To unsubscribe, edit your list preferences, or view the list archives, please visit: http://list.valvesoftware.com/mailman/listinfo/hlcoders
_______________________________________________ To unsubscribe, edit your list preferences, or view the list archives, please visit: http://list.valvesoftware.com/mailman/listinfo/hlcoders
_______________________________________________ To unsubscribe, edit your list preferences, or view the list archives, please visit: http://list.valvesoftware.com/mailman/listinfo/hlcoders

