Turok EX Modding Guide

Scripts kRenderModel

You can get a handle to an actor's render model with kActor::RenderModel().

See also kAnimState for animating the model.

Methods

void SetModel( kStr& modelPath, kStr& animPath )

change which model to display

e.g.,

self.RenderModel().SetModel(
	"models/dyn_grenade_launcher.bin",
	"anims/dyn_grenade_launcher_anim.bin" );

kVec3& Offset()

offset from the actor's location to render the model, in global coordinates

void SetRotationOffset( int node, float radians, float axisX, float axisY, float axisZ )

void SetRotationOffset( int node, kQuat& offset )

change the orientation of a part of the model, in local coordinates

void SetTexture( int node, int variant )

set the texture variant to use for all textures on a part of the model

void SetVisibility( int node, bool bVisible )

void HideSection( int node, int section, bool bHide )

set the visibility of a part of the model, or a portion thereof

void AddTrailEffect( kStr& effectName, int node )

attach a trail effect to a part of the model

void RemoveTrailEffect()

remove all attached trail effects

int GetNumAttachedTrails()

return the number of trail effects currently attached to the model