Jump to content

wrong way round


cassius
 Share

Recommended Posts

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.

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

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.

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

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);

Link to comment
Share on other sites

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);

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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.

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

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...