s&
About
The Project
info
About s&box
map
Roadmap
monitoring
Metrics
Engine startup and usage numbers
Updates
newspaper
Latest News
published_with_changes
Changes
Release-by-release changelog
Games
Browse Games
Discover Games
gamejams
Workshop
Playable
sports_esports
Games
Standalone games and gamemodes
Assets
landscape
Maps
view_in_ar
Models
texture
Materials
apparel
Clothing
apps
Everything
Every asset type in one list
Forum
Learn
Documentation
rocket_launch
Getting Started
docs
Documentation
api
API Reference
Resources
school
Tutorials
manage_search
Code Search
Get s&box
Sign in with Steam
Api
Components
BaseNpc
GetVelocity
chevron_left
Components
class
BaseNpc
Constructors
functions
BaseNpc
Properties
data_object
ActiveSchedule
data_object
Animation
data_object
DisplayName
data_object
EyeHeight
data_object
EyePosition
data_object
Faction
data_object
FatalImpactSpeed
data_object
GroundObject
data_object
GroundSurface
data_object
Health
data_object
IsAirborne
data_object
IsOnGround
data_object
MaxHealth
data_object
MaxSafeImpactSpeed
data_object
Movement
data_object
PhysicsCarrier
data_object
Renderer
data_object
Senses
data_object
ShowDebugOverlay
data_object
Speech
Methods
lock
CalculateAimPoint
functions
ClearRelationship
lock
CreateRagdoll
functions
EmitStimulus
lock
EndCurrentSchedule
functions
GetDisposition
lock
GetFallbackRelationship
functions
GetRelationship
lock
GetSchedule
functions
Launch
lock
OnAwake
lock
OnCarryStarted
lock
OnCarryStopped
lock
OnDamaged
lock
OnDamaging
lock
OnDeath
lock
OnDestroy
lock
OnDisabled
lock
OnStart
lock
OnUpdate
lock
ResetRelationships
lock
SelectSchedule
functions
SetMovement
lock
SetRelationship
lock
SetupRelationships
functions
StartCarry
functions
StopCarry
lock
Think
Static Methods
functions
CalculateEyePosition
functions
GetVelocity
functions
IsLiveTarget
GetVelocity
How fast a GameObject is moving: a player's controller velocity, an NPC's Sandbox.Npcs.Layers.AnimationLayer.MoveVelocity while it's moving, otherwise its rigidbody's velocity.
method
static
static
Vector3
GetVelocity
(
GameObject
go
)
Parameters
Name
Type
Description
go
GameObject
Returns
Type
Description
Vector3
people
Log in to reply
You can't reply if you're not logged in. That would be crazy.