Types

Blitz3D Forums/Blitz3D Beginners Area/Types

seferey(Posted 2006) [#1]
Here's a quick question for ya

can you use a type command to position a 3d models if so how?

I also understand some of the the type setup plus it can be used to read info from a function too can it

just curios that's all


_PJ_(Posted 2006) [#2]
Yeah basically in the same way as variables can be used as OBJECT handles for 3D models:

Mesh=LoadMesh("Mesh.X")


So can Type fields be used for these variables. In order to save memory, instead of LOADING a mesh each time, convention dictates that usually a master mesh model is COPIED each time....


Type Models
Field ObjectMesh
EndType

PlaceCOPY.Models = New Models
PlaceCOPY\ObjectMesh=CopyEntity(Mesh)
PoitionEntity PlaceCOPY\ObjectMesh,x,y,z

Hope that makes sense!

In short, the answer to BOTH your questions is YES!


seferey(Posted 2006) [#3]
I'm not picking on u or anything malice

but I think you messed up a line here

PoitionEntity PlaceCOPY\ObjectMesh,x,y,z

it's
PositionEntity PlaceCOPY\ObjectMesh,x,y,z



Ross C(Posted 2006) [#4]
Nope, that line seems correct to me. :o)