FANDOM


This commands sets the position of an object using a Direct3D transformation matrix. It is undocumented, but very useful for advanced users, and also for integrating with other APIs such as physX.

SyntaxEdit

void dbSetObjectWorldMatrix ( int iID, D3DXMATRIX* pMatrix );

UsageEdit

To use this function, we first need to create a D3DXMATRIX containing the position, rotation and scaling of the object in question. This is not hard when using the DirectX functions for matrix creation, but remember to include d3dx9.h when using these. After this we pass a pointer to this matrix to the function. This command somtimes messes up unless you use dbsetobjectposition before this.

ExampleEdit

size*=1.01;

D3DXMATRIX matrix;
D3DXMatrixScaling(&matrix, size,size,size);
dbSetObjectWorldMatrix(1, &matrix);

This creates a scaling matrix every frame that gradually makes object 1 bigger.

See AlsoEdit

dbGetObjectWorldMatrix

Ad blocker interference detected!


Wikia is a free-to-use site that makes money from advertising. We have a modified experience for viewers using ad blockers

Wikia is not accessible if you’ve made further modifications. Remove the custom ad blocker rule(s) and the page will load as expected.