cassius Posted August 29, 2015 Share Posted August 29, 2015 I got crawler big model from workshop and in my program point it at main character but it has its back to main character. Rotating it in code didn;t work. Can this be fixed in editor? its mdl format only. Quote amd quad core 4 ghz / geforce 660 ti 2gb / win 10 Blender,gimp,silo2,ac3d,,audacity,Hexagon / using c++ Link to comment Share on other sites More sharing options...
josk Posted August 29, 2015 Share Posted August 29, 2015 Under Physics tab of entity set Character Angle to 180. Quote Elite Cobra Squad Link to comment Share on other sites More sharing options...
cassius Posted August 29, 2015 Author Share Posted August 29, 2015 Thanks. Quote amd quad core 4 ghz / geforce 660 ti 2gb / win 10 Blender,gimp,silo2,ac3d,,audacity,Hexagon / using c++ Link to comment Share on other sites More sharing options...
cassius Posted August 30, 2015 Author Share Posted August 30, 2015 Setting the character angle in the editor does not work when the character loaded in by code. In fact it changed nothing in the editor as far as I could see. Quote amd quad core 4 ghz / geforce 660 ti 2gb / win 10 Blender,gimp,silo2,ac3d,,audacity,Hexagon / using c++ Link to comment Share on other sites More sharing options...
Skrakle Posted August 30, 2015 Share Posted August 30, 2015 Setting the character angle in the editor does not work when the character loaded in by code. In fact it changed nothing in the editor as far as I could see. I had this problem before, if i remember correctly, this should fix it: self.entity:SetCharacterControllerAngle(180); (or c++) model->SetCharacterControllerAngle(180); Quote Link to comment Share on other sites More sharing options...
cassius Posted August 30, 2015 Author Share Posted August 30, 2015 Nope. No luck. I could fix this in 5 seconds in uu3d but its mdl format only. It the barbarian character from darkness awakes. Quote amd quad core 4 ghz / geforce 660 ti 2gb / win 10 Blender,gimp,silo2,ac3d,,audacity,Hexagon / using c++ Link to comment Share on other sites More sharing options...
Skrakle Posted August 30, 2015 Share Posted August 30, 2015 Nope. No luck. I could fix this in 5 seconds in uu3d but its mdl format only. It the barbarian character from darkness awakes. Sorry, i forgot to tell you that you also need to add model->GetCharacterControllerAngle() where you set the angle with SetInput. This is how i'm doing it since i have a lot of models that are +180 as well. Example: model->SetInput(model_rotation.y + model->GetCharacterControllerAngle(), move_speed, 0, 0, false, 1, 0); Quote Link to comment Share on other sites More sharing options...
cassius Posted August 31, 2015 Author Share Posted August 31, 2015 Is model the actual character name or the name of its pivot physics controller? Quote amd quad core 4 ghz / geforce 660 ti 2gb / win 10 Blender,gimp,silo2,ac3d,,audacity,Hexagon / using c++ Link to comment Share on other sites More sharing options...
Skrakle Posted August 31, 2015 Share Posted August 31, 2015 Is model the actual character name or the name of its pivot physics controller? In my example, model is an Entity. Here's a brief example. // Declared in App.h // Entity* model = NULL; Vec3 model_rotation; // Loaded at start // model = Model::Load("Models/model_name.mdl"); model->SetCharacterControllerAngle(180); model_rotation = Vec3(0, 0, 0); // In your loop // float rot_speed = 0; if (window->KeyDown(Key::Left)) { rot_speed = -1.5; } else if (window->KeyDown(Key::Right)) { rot_speed = 1.5; } if (window->KeyHit(Key::Escape)) { model->Release(); return false; } model_rotation.y += rot_speed * Time::GetSpeed(); model->SetInput(model_rotation.y + model->GetCharacterControllerAngle(), 0, 0, 0, false, 1, 0); If you're still having issues, send me the model and i'll test it. Quote Link to comment Share on other sites More sharing options...
cassius Posted August 31, 2015 Author Share Posted August 31, 2015 Thanks a lot much apretiated Quote amd quad core 4 ghz / geforce 660 ti 2gb / win 10 Blender,gimp,silo2,ac3d,,audacity,Hexagon / using c++ Link to comment Share on other sites More sharing options...
cassius Posted August 31, 2015 Author Share Posted August 31, 2015 Well that was hard work, just to get a character to face the right way. Should be a rotate option in model editor. I will not be buying any mdl only format characters in the meantime. Quote amd quad core 4 ghz / geforce 660 ti 2gb / win 10 Blender,gimp,silo2,ac3d,,audacity,Hexagon / using c++ 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.