Added 5 Unity classes + Fix X-mirroring of models#103
Added 5 Unity classes + Fix X-mirroring of models#103j5rlLqM-rvsrY96V-GpVJP0F-IZFesRzy-ShMoz wants to merge 5 commits intoHearthSim:masterfrom
Conversation
Added SphereCollider, CapsuleCollider and MeshCollider.
Added SphereCollider, CapsuleCollider and MeshCollider.
- Added MeshRenderer - Added RendererBase and ParticleRendererBase to reduce code while achieving the same result.
Added the one value MeshFilter has.
|
Hey! By any chance, would you know how to add support for the new (Unity 5.5+) shaders? |
|
I would recommend looking at the YAML-dump of such a shader. |
|
Thanks for the advice. Unfortunately, that doesn't help because the shader code itself is stored under |
|
I see. The compression you're looking at is most likely done using the .net deflate class. |
I had a headache trying to figure out what was wrong with my code. Turns out it wasn't my code but this code. Might have to do with the specific Unity version?
| @staticmethod | ||
| def face_str(indices, coords, normals): | ||
| ret = ["f "] | ||
| for i in indices[::-1]: |
There was a problem hiding this comment.
I believe this was done to convert from left-handed coordinates to right-handed coordinates, FWIW. So without this the face normals would all be inside out in tools that expect right-handed models.
There was a problem hiding this comment.
Oh, um, TBH I thought pull requests would only add the commits from before they were made.
Either way, you are correct, however removing the - on line 31 inverts the models once, so the face normals are as they should.
I know it's a bit counter-intuitive but if you test it, it should be fine.
I added 5 classes that I came along on my travels:
MeshFilter, MeshRenderer, MeshCollider, SphereCollider and CapsuleCollider.
I also cleaned up renderer.py a bit.