adjustDisplays

circle-exclamation
circle-info

Cap Modelarrow-up-right by Yegor_Mechanicarrow-up-right

Entity → Zombie

Goal → Keep the hat visibly attached to, and aligned with, the zombie's head

Requirement: A follow property (default or part) with its followType set to PITCH_AND_YAW or PITCH

  • image


adjustDisplays DISABLED

  • Using /deu group ride -target <controller-id> we can view how the group will look without any adjustments

  • Zombie at 0 pitch

image

  • Zombie at 45 pitch

image

When the zombie's pitch changes, the cap does not move to a desirable position and isn't properly positioned on the zombie's head


ENABLING adjustDisplays

image

The x and y adjustment percentages determine how strong the adjustment should deviate from the default behavior

  • yDisplayAdjustPercentage determines the local vertical offset percentage (How far the cap from the top of the zombie's head)

  • zDisplayAdjustPercentage determines the local horizontal offset percentage (How far forward/backward the cap is)

  • This system is in place due to the varying shapes and sizes of models and there isn't a way to always know what values should be input.

  • It takes trial and error to find the best fitting values

triangle-exclamation

Testing different values on zDisplayAdjustPercentage

  • The yDisplayAdjustPercentage appears fine so it can stay at 100.

  • Only the zDisplayAdjustPercentage's value will be changed

  • A value of 50 increases the problem at pitch 45 so instead a number above 100 should be used

    image

  • A value of 150 lessens the issue at pitch 45 and seems perfect at pitch 90

    image image

  • A value of 162.5 isn't too bad for both pitch 45 and pitch 90

    image image

  • A value of 175 is almost perfect at pitch 45 but doesn't look too good at pitch 90.

    image image

A value around 162.5 seems like the best choice.


groupProperties and defaultFollowProperties used for this example

Last updated