This is a read only copy without any forum functionality of the old Modcraft forum.
If there is anything that you would like to have removed, message me on Discord via Kaev#5208.
Big thanks to Alastor for making this copy!

Menu

Author Topic: [Question] New target texture facing the wrong way  (Read 1244 times)

nadszeg

  • Registred Member
  • Polygonshifter
  • *****
  • Posts: 71
    • View Profile
[Question] New target texture facing the wrong way
« 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?

nadszeg

  • Registred Member
  • Polygonshifter
  • *****
  • Posts: 71
    • View Profile
Re: [Question] New target texture facing the wrong way
« Reply #1 on: April 25, 2017, 03:38:12 pm »
The correct way it should work: http://imgur.com/a/okHNb

nadszeg

  • Registred Member
  • Polygonshifter
  • *****
  • Posts: 71
    • View Profile
Re: [Question] New target texture facing the wrong way
« Reply #2 on: April 29, 2017, 01:49:54 am »
Does anyone know how to do this?  :'(

inico

  • Contributors
  • Model Change Addict
  • *****
  • Posts: 243
    • View Profile
    • http://www.youtube.com/inicocustom
Re: [Question] New target texture facing the wrong way
« Reply #3 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.
« Last Edit: May 06, 2017, 11:10:41 pm by inico »

schlumpf

  • Administrator
  • Creator of Worlds
  • *****
  • Posts: 2967
    • View Profile
Re: [Question] New target texture facing the wrong way
« Reply #4 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.