karloz Posted July 26, 2010 Share Posted July 26, 2010 It is possible to replace col meshes for world objects, or only for mtasa created ones? I mean i replace collision for an object X, the collision will be effective for objects created by mta? or it will be effective for all existing (world) objects of type X? im trying to replace a missing interior collision mesh but it doesnt seems to work Link to comment
50p Posted July 26, 2010 Share Posted July 26, 2010 Collision, model and texture replacement should work with all models with that specific ID no matter whether it's object created with MTA or GTA world model. Link to comment
karloz Posted July 26, 2010 Author Share Posted July 26, 2010 Is there any limitation with the type of mesh? Like no boxes, or that doesnt make a diff? A polygonal mesh seems to work fine. But one with boxes doesnt. Link to comment
50p Posted July 26, 2010 Share Posted July 26, 2010 What do you mean? A collision mesh is a single mesh. It can be "Editable poly" or "Editable mesh". It doesn't matter what shapes this model has or if it's 1 mesh or a few. Make sure your scale is correct before you export collision mesh. Maybe your mesh is too big or too small and you may see no difference in game. Link to comment
karloz Posted July 26, 2010 Author Share Posted July 26, 2010 There can be axis aligned boxes too, i had placed a box incorrectly. Maybe thats why gta was ignoring it Now happens this that is very rare: The collisions seems to be incorrect in the orginal interior In the other hand if i create the objects manually the collisions are correct (interior 0) and (interior 2) Link to comment
Kayl Posted July 27, 2010 Share Posted July 27, 2010 Indeed, col mesh replacement for gta world objects is a bit buggy. How I diagnosed the problem: Since you can't get the bounding box of a gta object (to debug its col mesh), I tried to create a ghost MTA version of the object and display its bounding box to see when the problem occurs. Right after the col replacement, the bbox is fine. If you move away from your ghost/gta original object it's still ok. But when you come back, I guess right at the time the object switches between LOD version and real version, the bbox returns to the original gta state, showing the col mesh has been reset. And indeed even if your gta object is still visually "replaced", it collides as the original. The workaround I have found so far : (requires preparation to get the desired bbox right) + Load & replace txd/dff/col + Create a ghost object at the same position & rotation as the original gta object (get the coords using MEd) (you need to inverse rotation found in MEd). + Ghost should be non collidable & invisible + When a ghost is streamed in, use onClientRender to check its bounding box every frame + When the bounding box suddenly turns out to be wrong (hence the preparation required), reload and re-replace the col mesh (and don't do bbox check for some seconds) Link to comment
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now