Garry's Mod Wiki

Entity:DropToFloor

Entity:DropToFloor()

Description

Move an entity down until it collides with something.

The entity needs to already have something below it within 256 units.

Example

Move all props on the server down until they collide with something.

for _, ent in ipairs( ents.FindByClass( "prop_physics" ) ) do ent:DropToFloor() end

Example

Drops players to the ground when they spawn.

hook.Add( "PlayerSpawn", "DropGround", function( ply ) ply:DropToFloor() end )

Page Links


Special Pages


Wikis

?

Render Time: 31ms

DB GetPage 3
Generate Html 1
SaveChanges (1) 11
Render Body 0
Render Sidebar 13