Upset Baby Games

Upset Baby Games




ubg_3d2d_create_meshtracker(transform, vbuffer, prim, format);
Argument name Type Description
transform matrix model matrix that indicates transforms
vbuffer real vertex buffer of the model
prim real primitive type (only supports pr_trianglestrip and pr_trianglelist)
format array array containing order of vertex format for the model

Returns: (array)


Creates a tracker structure to handle collision checks with a mesh. Whenever a property of this mesh is modified you should update this tracker accordingly.

Because the mesh-tracker has to create some buffer data the structure must be destroyed when you are finished using it!

NOTE: You cannot use frozen vertex buffers because they are unreadable! Make sure you create your meshtracker before you freeze your buffer! *


ubg_3d2d_create_meshtracker(matrix_get(matrix_model), model_vbuffer, pr_trianglelist, [vertex_format_color, vertex_format_position_3d]);