source-2-wiki

Unofficial Source 2 Wiki

View on GitHub

CBodyComponent

Methods

SetAnimation

void SetAnimation(string)
Pass string for the animation to play on this model

SetVelocity

void SetVelocity(Vector)


DetachFromParent

void DetachFromParent()
Detach from its parent

AddImpulseAtPosition

void AddImpulseAtPosition(Vector, Vector)
Apply an impulse at a worldspace position to the physics

SetMaterialGroup

void SetMaterialGroup(utlstringtoken)


SetAngularVelocity

void SetAngularVelocity(Vector)


LookupSequence

<unknown> LookupSequence(string)
Returns a sequence id given a name


AddVelocity

void AddVelocity(Vector, Vector)
Add linear and angular velocity to the physics object

SequenceDuration

float SequenceDuration(string)
Returns the duration in seconds of the specified sequence

IsAttachedToParent

bool IsAttachedToParent()
Is attached to parent

GetSequence

<unknown> GetSequence()
Returns the active sequence