reepblue Posted July 15, 2022 Posted July 15, 2022 Ultra Engine should include static function calls that contain the following. static const Vec3 Vec3::Up() { return Vec3(0,1,0); } static const Vec3 Vec3::Forward() { return Vec3(0,0,1); } // Maybe this too? static const Vec3 Vec3::Right() { return Vec3(1,0,0); } I was following this math tutorial that was exampled in Unity and thought future users would get stuck when a guide or tutorial called for an Up() or Forward() call with them not knowing what it actually is. (Because I didn't!) Once I was able to figure out what that Vector3.Up actually was with this, I had this working in Leadwerks. This would be a nice thing to have for people coming over from your competitors. 1 Quote Cyclone - Ultra Game System - Component Preprocessor - Tex2TGA - Darkness Awaits Template (Leadwerks) If you like my work, consider supporting me on Patreon!
Josh Posted July 15, 2022 Posted July 15, 2022 When C# support is added I might do this. Quote Let's build cool stuff and have fun.
Josh Posted July 15, 2022 Posted July 15, 2022 To me, this is like having constants like this: const float THREE_AND_ONE_HALF = 3.5f; const int NINETY_NINE = 99; const String THE_LETTER_Q = "Q"; 2 Quote Let's build cool stuff and have fun.
reepblue Posted July 15, 2022 Author Posted July 15, 2022 Maybe, just thought it would make the transition from other engines a lot easier. 1 Quote Cyclone - Ultra Game System - Component Preprocessor - Tex2TGA - Darkness Awaits Template (Leadwerks) If you like my work, consider supporting me on Patreon!
SpiderPig Posted July 15, 2022 Posted July 15, 2022 I think it's worth adding. It's much nice to type Vec3.UP than Vec3(0.0,1.0,0.0). 1 Quote
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.
Note: Your post will require moderator approval before it will be visible.