Jump to content

Recommended Posts

Posted

Using LoadModel("...") loads the PHY, GMF entities and runs the LUA script for an object.

 

But I want to pre-cache some objects for instancing quickly using CopyEntity(). In my case a number of anti-tank missiles and rockets.

 

screenshot_290.jpg

 

I was looking for a CopyModel() equivalent of CopyEntity(). This isn't such a big deal as I can create the TModel and use CopyEntity() to instance the visual model easily enough. Unless I'm mistaken?

6600 2.4G / GTX 460 280.26 / 4GB Windows 7

Author: GROME Terrain Modeling for Unity, UDK, Ogre3D from PackT

Tricubic Studios Ltd. ~ Combat Helo

Posted

When used on a model, CopyEntity() will return a new instance of the model, as if it were loaded from disk.

 

Aha, that's what I thought. But it's not the behaviour I was observing so I examined my code this morning.

 

Turns out, that if you use CopyEntity() on a Model that's Hidden, only the visual appearance is copied. I was pre-loading the model then using HideEntity() right away. If I unhide the model then CopyEntity() it works as expected.

 

Cheers

6600 2.4G / GTX 460 280.26 / 4GB Windows 7

Author: GROME Terrain Modeling for Unity, UDK, Ogre3D from PackT

Tricubic Studios Ltd. ~ Combat Helo

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...