ProwlEngine / Prowl

An Open Source C# 3D Game Engine under MIT license, inspired by Unity and featuring a complete editor and built on Silk.NET
MIT License
360 stars 30 forks source link

Fixed issue Where .fbx files Were Being imported Improperly #61

Closed 10xJosh closed 9 months ago

10xJosh commented 9 months ago

This fix is for issue #26. It turns out the issue is caused by Json deserialization of the object. I wasn't able to pinpoint exactly where at in the deseiralization the scale was becoming changed but the lines of code I implemented should fix the issue. Oddly enough, the 2nd tier child in the hierarchy was where the issue was manifesting from.

In addition to the scale issue, the rotation of the object was off as well. Implemented a fix for that as well

2023-11-27 22_13_28-Prowl

With these changes, it might be better to change up the EngineObject.Instantiate() to return a GameObject instead of an engineObject to reduce the amount of casting in the other methods. I noticed the Instantiate() method is only being called in the hierarchy so it wouldn't be too hard to implement. Let me know if that's something you want me to implement or if there's anything I'm missing.