About Store Forum Documentation Contact
Donations:
289$/mo



Post Reply 
mesh.parts elements missing
Author Message
Tottel Offline
Member

Post: #1
mesh.parts elements missing
Hi there!

I have a Chr object (default from the tutorials). I have added a bunch of boxes as mesh parts on this object (object editor -> mesh -> parts -> new -> box).

However, when I loop over the mesh.parts of this Chr in code, I find that only one of them got actually added. Removing and adding them all didn't help. They have no material assigned, but assigning a material also didn't fix it.

I checked the source code but don't see anything obvious that could be causing this. Any ideas?
07-25-2019 09:13 PM
Find all posts by this user Quote this message in a reply
Esenthel Offline
Administrator

Post: #2
RE: mesh.parts elements missing
1) mesh parts with the same material are merged together
2) to draw parts with null material, you need to enable D.drawNullMaterials or something like that
07-26-2019 03:50 AM
Find all posts by this user Quote this message in a reply
Tottel Offline
Member

Post: #3
RE: mesh.parts elements missing
I'm adding them as hitboxes, so I don't really want to draw them anyway (hence, I assign no material).
But that does indeed seem to merge them all together. Can I disable this behaviour somehow, or do I need to add a different, empty, material per hitbox?
(This post was last modified: 07-26-2019 07:37 AM by Tottel.)
07-26-2019 07:35 AM
Find all posts by this user Quote this message in a reply
Esenthel Offline
Administrator

Post: #4
RE: mesh.parts elements missing
To disable merging, apart from setting different materials, you can just assign different "Draw Group" enums. See "Groups" tab in Object Editor.
07-26-2019 10:24 AM
Find all posts by this user Quote this message in a reply
Tottel Offline
Member

Post: #5
RE: mesh.parts elements missing
That'll work perfectly, thanks!
07-26-2019 10:47 AM
Find all posts by this user Quote this message in a reply
Post Reply