Raised This Month: $32 Target: $400
 8% 

Solved [CS:GO] make prop_physics_multiplayer fall through the world (not collide with world)


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
ImACow
AlliedModders Donor
Join Date: Feb 2015
Old 11-10-2016 , 18:39   [CS:GO] make prop_physics_multiplayer fall through the world (not collide with world)
Reply With Quote #1

Most of the threads found on AM are about fixing this issue.
However I need to create it ;)

I want to spawn a "prop_physics_multiplayer" that fall trough the world, collides with nothing even no brushes.

tried with Solid types, collision groups.

nothing seems to work so far it keeps colliding with map brushes


Research:
Code:
SetEntityMoveType -> MOVETYPE_VPHYSICS is needed to make the prop fall
__________________

Last edited by ImACow; 10-01-2017 at 13:02.
ImACow is offline
ImACow
AlliedModders Donor
Join Date: Feb 2015
Old 11-10-2016 , 18:51   Re: [CS:GO] make prop_physics_multiplayer fall through the world (not collide with wo
Reply With Quote #2

Found it.

(added for anyone else looking for this)

Code:
SetEntProp(entity, Prop_Send, "m_usSolidFlags", 12); 
SetEntProp(entity, Prop_Data, "m_nSolidType", 6); 
SetEntProp(entity, Prop_Send, "m_CollisionGroup", 1);
m_usSolidFlags

Code:
 m_usSolidFlags = FSOLID_NOT_SOLID + FSOLID_TRIGGER
Code:
enum SolidFlags_t
{
	FSOLID_CUSTOMRAYTEST		= 0x0001,	// Ignore solid type + always call into the entity for ray tests
	FSOLID_CUSTOMBOXTEST		= 0x0002,	// Ignore solid type + always call into the entity for swept box tests
	FSOLID_NOT_SOLID			= 0x0004,	// Are we currently not solid?
	FSOLID_TRIGGER				= 0x0008,	// This is something may be collideable but fires touch functions
											// even when it's not collideable (when the FSOLID_NOT_SOLID flag is set)
	FSOLID_NOT_STANDABLE		= 0x0010,	// You can't stand on this
	FSOLID_VOLUME_CONTENTS		= 0x0020,	// Contains volumetric contents (like water)
	FSOLID_FORCE_WORLD_ALIGNED	= 0x0040,	// Forces the collision rep to be world-aligned even if it's SOLID_BSP or SOLID_VPHYSICS
	FSOLID_USE_TRIGGER_BOUNDS	= 0x0080,	// Uses a special trigger bounds separate from the normal OBB
	FSOLID_ROOT_PARENT_ALIGNED	= 0x0100,	// Collisions are defined in root parent's local coordinate space
	FSOLID_TRIGGER_TOUCH_DEBRIS	= 0x0200,	// This trigger will touch debris objects

	FSOLID_MAX_BITS	= 10
};

m_nSolidType

Code:
 m_nSolidType= SOLID_VPHYSICS
Code:
enum SolidType_t
{
	SOLID_NONE			= 0,	// no solid model
	SOLID_BSP			= 1,	// a BSP tree
	SOLID_BBOX			= 2,	// an AABB
	SOLID_OBB			= 3,	// an OBB (not implemented yet)
	SOLID_OBB_YAW		= 4,	// an OBB, constrained so that it can only yaw
	SOLID_CUSTOM		= 5,	// Always call into the entity for tests
	SOLID_VPHYSICS		= 6,	// solid vphysics object, get vcollide from the model and collide with that
	SOLID_LAST,
};
m_CollisionGroup

Code:
 m_CollisionGroup = COLLISION_GROUP_DEBRIS
Code:
enum Collision_Group_t
{
	COLLISION_GROUP_NONE  = 0,
	COLLISION_GROUP_DEBRIS,			// Collides with nothing but world and static stuff
	COLLISION_GROUP_DEBRIS_TRIGGER, // Same as debris, but hits triggers
	COLLISION_GROUP_INTERACTIVE_DEBRIS,	// Collides with everything except other interactive debris or debris
	COLLISION_GROUP_INTERACTIVE,	// Collides with everything except interactive debris or debris
	COLLISION_GROUP_PLAYER,
	COLLISION_GROUP_BREAKABLE_GLASS,
	COLLISION_GROUP_VEHICLE,
	COLLISION_GROUP_PLAYER_MOVEMENT,  // For HL2, same as Collision_Group_Player, for
										// TF2, this filters out other players and CBaseObjects
	COLLISION_GROUP_NPC,			// Generic NPC group
	COLLISION_GROUP_IN_VEHICLE,		// for any entity inside a vehicle
	COLLISION_GROUP_WEAPON,			// for any weapons that need collision detection
	COLLISION_GROUP_VEHICLE_CLIP,	// vehicle clip brush to restrict vehicle movement
	COLLISION_GROUP_PROJECTILE,		// Projectiles!
	COLLISION_GROUP_DOOR_BLOCKER,	// Blocks entities not permitted to get near moving doors
	COLLISION_GROUP_PASSABLE_DOOR,	// Doors that the player shouldn't collide with
	COLLISION_GROUP_DISSOLVING,		// Things that are dissolving are in this group
	COLLISION_GROUP_PUSHAWAY,		// Nonsolid on client and server, pushaway in player code

	COLLISION_GROUP_NPC_ACTOR,		// Used so NPCs in scripts ignore the player.
	COLLISION_GROUP_NPC_SCRIPTED,	// USed for NPCs in scripts that should not collide with each other

	LAST_SHARED_COLLISION_GROUP
};
__________________

Last edited by ImACow; 11-11-2016 at 05:28. Reason: bad paste
ImACow is offline
Peace-Maker
SourceMod Plugin Approver
Join Date: Aug 2008
Location: Germany
Old 11-10-2016 , 22:41   Re: [CS:GO] make prop_physics_multiplayer fall through the world (not collide with wo
Reply With Quote #3

m_nSolidType valueset is different from m_usSolidFlags'. Checkout smlib.
PHP Code:
enum SolidType_t
{
    
SOLID_NONE            0,    // no solid model
    
SOLID_BSP            1,    // a BSP tree
    
SOLID_BBOX            2,    // an AABB
    
SOLID_OBB            3,    // an OBB (not implemented yet)
    
SOLID_OBB_YAW        4,    // an OBB, constrained so that it can only yaw
    
SOLID_CUSTOM        5,    // Always call into the entity for tests
    
SOLID_VPHYSICS        6,    // solid vphysics object, get vcollide from the model and collide with that
    
SOLID_LAST,
}; 
so you're setting m_nSolidType to SOLID_VPHYSICS.
__________________
Peace-Maker is offline
ImACow
AlliedModders Donor
Join Date: Feb 2015
Old 11-11-2016 , 06:31   Re: [CS:GO] make prop_physics_multiplayer fall through the world (not collide with wo
Reply With Quote #4

Now I cannot re-solidify them, haha
I guessed just setting all the flags back to normal state would solve it, but not at all.

Code:
//entity natural spawn flags
[SPAWN] Entity_GetSpawnFlags(256)
[SPAWN] Entity_SetSolidFlags(0)
[SPAWN] Entity_GetSolidType(6)
[SPAWN] Entity_GetCollisionGroup(17)

//change the prop to non solid
[POST] Entity_GetSpawnFlags(256)
[POST] Entity_SetSolidFlags(12)
[POST] Entity_GetSolidType(6)
[POST] Entity_GetCollisionGroup(1)

//re-solidify it
[POST] Entity_GetSpawnFlags(256)
[POST] Entity_GetSolidFlags(0)
[POST] Entity_GetSolidType(6)
[POST] Entity_GetCollisionGroup(17)
It doesn't generate +use output & players can walk through them. :/
__________________
ImACow is offline
ImACow
AlliedModders Donor
Join Date: Feb 2015
Old 10-01-2017 , 13:02   Re: [CS:GO] make prop_physics_multiplayer fall through the world (not collide with wo
Reply With Quote #5

The solution for this was:

PHP Code:
    SetEntProp(entProp_Send"m_usSolidFlags"FSOLID_NOT_SOLID|FSOLID_TRIGGER); 
    
SetEntProp(entProp_Data"m_nSolidType"SOLID_VPHYSICS); 
    
SetEntProp(entProp_Send"m_CollisionGroup"COLLISION_GROUP_DEBRIS); 
__________________
ImACow is offline
artvin_boy
Junior Member
Join Date: Sep 2020
Location: Ottoman Empire
Old 03-27-2023 , 22:57   Re: [CS:GO] make prop_physics_multiplayer fall through the world (not collide with wo
Reply With Quote #6

Thanks alot for posting what worked even when you figured it out yourself, a savior!
__________________
Sup.
artvin_boy is offline
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 16:15.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode