TheConceptBoy Posted June 16, 2019 Share Posted June 16, 2019 Good day, everyone. The title is purposefully simplistic since when I goggled for this issue, few relevant posts popped up. Currently I have a model of an enemy and it gets a PhysicsMode(Entity::CharacterPhysics) assigned to it. When the model moves forward using the input() commands, the character model is facing sideways. Now I can fix that in two ways: 1) I can Create a Dummy Empty and set that to a character controller, then parent the model to the dummy and rotate it in local space. 2) Or I can rotate the model in the modeling software to face the right way. My question is, is there a third option? Something in the properties or perhaps orientation function for making the model face the same forward direction as the forward movement of the character controller? I've scoped the docs for any appropriate functions but alas the top two solutions are the only ones I've found. Decided to ask just in case. Quote Link to comment Share on other sites More sharing options...
Yue Posted June 17, 2019 Share Posted June 17, 2019 https://www.leadwerks.com/learn?page=API-Reference_Object_Entity_SetInput Quote Link to comment Share on other sites More sharing options...
TheConceptBoy Posted June 17, 2019 Author Share Posted June 17, 2019 I should mention that I'm not using the Editor to create the character controllers. I'm using C++ to loop through all the enemy models I placed in the level and create the Actors that way. EDIT: well actually this also works even when I'm attaching the character controller in c++. Thanks. I do wonder if there is a C++ function for this, seeing how its in the editor and the editor has got to call some sort of a function. Quote Link to comment Share on other sites More sharing options...
TheConceptBoy Posted June 17, 2019 Author Share Posted June 17, 2019 AND YES IT IS. IT'S IN THE DAMN ENGINE FILES, But it's NOT in the docs. virtual void SetCharacterControllerAngle(const float angle);//lua virtual float GetCharacterControllerAngle();//lua @Josh How come so much useful stuff is undocumented? Do you need help getting documentation for some functions in the docs. A well designed Documentation that's easy to traverse and search is the hallmark of an engine for new arrivals. Game Maker Studio is perhaps an example of, what I'd say the worlds best documentation for their engine. 80% of what I've learned, I've discovered in their help by typing in a keyword like "draw" and I'd get ALL draw related functions. Seriously, if you need help documenting some stuff, perhaps we can contribute on our spare time? 3 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.
Note: Your post will require moderator approval before it will be visible.