Modcraft - The community dedicated to quality WoW modding!

Wrath of the Lich King Modding => "Retro-Porting" => Topic started by: nadszeg on April 25, 2017, 03:23:29 pm

Title: [Question] New target texture facing the wrong way
Post by: nadszeg on April 25, 2017, 03:23:29 pm
Hi all! I tried to port the new target circle texture from legion, and it works, but with every version I tried (WotLK, Cata, MoP) the pointy part is facing my character instead of showing which way the NPCs are facing... here's a screenshot: http://imgur.com/a/jEHL6

Is there a way to fix this?
Title: Re: [Question] New target texture facing the wrong way
Post by: nadszeg on April 25, 2017, 03:38:12 pm
The correct way it should work: http://imgur.com/a/okHNb
Title: Re: [Question] New target texture facing the wrong way
Post by: nadszeg on April 29, 2017, 01:49:54 am
Does anyone know how to do this?  :'(
Title: Re: [Question] New target texture facing the wrong way
Post by: inico on May 06, 2017, 11:06:20 pm
Is there a way to fix this?

Basically, the circle mesh is billboarded (it follows the camera), you need to remove that flag. However the model is procedurally generated, so you don't have an actual m2 to edit.
Maybe you can achieve something by editing wow.exe. Look for "ObjectSelectionCircle" and see if you find something related to the flags.
Title: Re: [Question] New target texture facing the wrong way
Post by: schlumpf on May 07, 2017, 10:07:33 am
It is unlikely you can fix this by just setting a flag. It likely needs additional code, not just a flag. The WoD+ implementation is at least

Code: [Select]
  C3Vector position, unit_position;
  C44Matrix mat;
  CGWorldFrame::GetCameraPosition(&position);
  v18 = CalculateFacingTo(&position, &unit_position);
  C44Matrix::RotateAroundZ(&mat, -v18);
  v19 = 0;
  CGGameUI::GetSelectionDeadHighlightColor(&v19);
  World::ProjectTex2d(&v21, &v19, &mat, 0.5, 0x200122u, 9u, EGxPolygonOffset_1);

so actually calculating facing depending on object position.