Mitovo Posted January 13, 2017 Share Posted January 13, 2017 Hello,So, the title pretty much sums it up. I have a custom mesh I've imported into T3D, and I set the collision to "visible mesh" (I intend to create proper collision meshes at a later time, but this is just for set-up/mock-up work). I notice that I can rotate the model how ever I want and collision works fine. However, when I scale it, the collision breaks and my character runs right through it. I have multiple duplicates of the same object in my scene right now, and the ones kept at, or very near original size work fine. The ones I've scaled notably larger lose their collision.Is there a way to fix this, or kind of "refresh" the collision to work on the larger mesh size on those objects?And while I'm at it, a second question, can you have multiple collision meshes per object? Since collision meshes need to be convex, it would make it difficult to create a convincing looking collision mesh for an object that has an overhang or is otherwise concave in shape, without the player hitting an "invisible wall". Thanks! Quote Link to comment Share on other sites More sharing options...
JeffR Posted January 13, 2017 Share Posted January 13, 2017 For the first part: do you know if it stays broken if you scale the object, save, exit and reload? Or does it work if the object is created with the new scale? That'd help narrow things downFor the second part, yeah, you can either have collision meshes in the art file itself, which follow a naming convention(I beleive it's if the submesh is named Col-*, where the * is a number).Alternatively, you can load the shape up in the shape editor and use the collision tab to automatically generate convex hull collision meshes. It's easier than doing it in a modelling program, but because it's automated, may not give the preferred results.Either way, either of these methods will work. Quote Link to comment Share on other sites More sharing options...
Mitovo Posted January 13, 2017 Author Share Posted January 13, 2017 For the first part: do you know if it stays broken if you scale the object, save, exit and reload? Or does it work if the object is created with the new scale? That'd help narrow things down Hi there,I meant to include that in the previous message, but forgot to add it. No, saving, closing and re-opening the file doesn't help. Not sure how you mean creating it with the new scale? You mean create a larger version of the object in Blender and then import that? Quote Link to comment Share on other sites More sharing options...
Mitovo Posted January 13, 2017 Author Share Posted January 13, 2017 Okay, I just noticed something.When I scale up the object, the visible mesh is increasing, but the collision size is staying the same. So, the larger I make it, I'm able to run further into the visible mesh before I hit the collision. Now, I've tried finding a way to update the collision mesh after increasing it, but have not been able to do this.I've also tried adding it as a new object, from the original DAE file, increasing the size first, *then* setting the collision, but that isn't working either. Still getting the same effect. The collision mesh is being created at the original size of the object. Quote Link to comment Share on other sites More sharing options...
Duion Posted January 13, 2017 Share Posted January 13, 2017 I never had problems with that and I build levels with visible mesh collision for quite a while now. Quote Link to comment Share on other sites More sharing options...
Mitovo Posted January 13, 2017 Author Share Posted January 13, 2017 Here's a video I just recorded showing what's happening. This is the process I've used for any other object I've imported, etc, and this is the first time it's doing this, at least that I can recall.http://tinyurl.com/zp272zvMaybe someone will see a clue in the video as to what's happening. Apologies for the awful frame-rate. Apparently Corel VideoStudio's recorder isn't very good for 3D games, and NVidia's recorder wasn't cooperating with me. Still, it gets the idea across. Quote Link to comment Share on other sites More sharing options...
Duion Posted January 13, 2017 Share Posted January 13, 2017 I just tested myself and for me it works.What build are you using? Are you using bullet or physX? Quote Link to comment Share on other sites More sharing options...
Mitovo Posted January 13, 2017 Author Share Posted January 13, 2017 I just tested myself and for me it works.What build are you using? Are you using bullet or physX? It's 3.8, and I'm using Physx. I'd confirm which PhysX version, but now T3D won't get past the "loading datablocks" stage so I can get into the game/editor. Ugh lol. Quote Link to comment Share on other sites More sharing options...
Duion Posted January 13, 2017 Share Posted January 13, 2017 Then it is probably a phsyics problem, the T3D stock physics work fine, but I encountered collision errors with bullet and/or physX before. Quote Link to comment Share on other sites More sharing options...
JeffR Posted January 13, 2017 Share Posted January 13, 2017 Thanks for the details MiToVo.I'll fire it up with PhysX and have a look. Most likely thing is when the object scale changes, that's not applied to the physics rep, so it never passes along to the physics sim.I'll let you know what I find. Quote Link to comment Share on other sites More sharing options...
Mitovo Posted January 13, 2017 Author Share Posted January 13, 2017 Thanks for the details MiToVo.I'll fire it up with PhysX and have a look. Most likely thing is when the object scale changes, that's not applied to the physics rep, so it never passes along to the physics sim.I'll let you know what I find. Sounds good! Thanks! Quote Link to comment Share on other sites More sharing options...
JeffR Posted January 16, 2017 Share Posted January 16, 2017 Looks like whatever issue you're running into with the scale not applying got fixed at some point in devhead. I spawned a static mesh, visible collision, and tested it in stock, bullet and physx3.3 and it worked in all 3 cases to scale the mesh and have collisions update appropriately.Will need to eyeball the changes to the physics stuff to see what changes were in play there from 3.8. Quote 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.