Flexman Posted April 9, 2010 Share Posted April 9, 2010 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. 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? Quote 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 Link to comment Share on other sites More sharing options...
Josh Posted April 10, 2010 Share Posted April 10, 2010 When used on a model, CopyEntity() will return a new instance of the model, as if it were loaded from disk. Quote My job is to make tools you love, with the features you want, and performance you can't live without. Link to comment Share on other sites More sharing options...
Flexman Posted April 10, 2010 Author Share Posted April 10, 2010 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 Quote 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 Link to comment Share on other sites More sharing options...
Recommended Posts
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.