Citizens2 icon indicating copy to clipboard operation
Citizens2 copied to clipboard

/npc lookclose: Option to set a total range for the NPC's head and body rotation

Open Andre601 opened this issue 2 years ago • 2 comments

I confirm that I have ...

  • [X] ...tried the latest Development Build to make sure my feature doesn't exist already.
  • [X] ...checked the Wiki for any possible information about my feature.
  • [X] ...checked other existing issues for my feature request.

Description

NPCs with lookclose enabled are currently rotating their heads and bodies in a 360° range, which may look weird when f.e. a wall is between you and the NPC, yet the NPC looks straight at you through that wall.

My proposal is to add an optional set of arguments to the /npc lookclose command to apply a "range" to the NPCs lookclose attribute. With this applied, would the NPC only rotate the head up to a certain point at which it would stop.

Quick Example: Assuming that the command would use Minecraft's YAW values for the range and that -180° is cardinal north in MC, using a command such as /npc lookclose -135 -225 would now make the NPC rotate its head between -135° and -225°

Here's a visual representation of the area the NPC's head would be rotating in: 2022-04-05_21 29 59

The most difficult thing I can assume is to know in what directions the NPC should rotate its head. So perhaps three arguments would be required for a left, middle and right yaw to guarantee it doesn't assume a completely wrong direction (i.e. a direction of 0 to -180 wouldn't assume a direction through -270 when a rotation through -90 is wanted).

Code Example

No response

Andre601 avatar Apr 05 '22 19:04 Andre601

Just to note you can also use /npc lookclose -r to at least try and avoid looking through walls

fullwall avatar Apr 09 '22 07:04 fullwall

I vouch for this.

MathiasSvDK avatar Apr 24 '22 11:04 MathiasSvDK