Урна-цинерарий: своя модель, свечение по черепу, кровь в рецепте
Модель (бандл necrocinerarium, BlenderWork/necroCinerarium/make_urn.py): тело вращения в чёрной глазури, по четырём сторонам - вдавленные лицевые части черепа, наклонённые вниз; руны старшего футарка кровью «SERVU ĜIS LA LASTA CINDRO» («Служи до последнего пепла»), меандр на ножке, бусины на шейке, пояс черепов в двух линиях. Руны тлеют красным, глазницы светятся фиолетовым, только когда в урне череп (_EmissionColor через MaterialPropertyBlock). Своя иконка. Коллайдер-тег - DecorColliderTagPatch. Дух: выше на 10 см и на 7 см вперёд в своей системе (хвост не вылезает сзади), necrogenie fwd. Рецепт: + кровь некроманта, копия на соке розы. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 5.5
parent
94bf0a5f5c
commit
9f813bb699
@@ -22,8 +22,13 @@ namespace NecromancerTome
|
||||
{
|
||||
public const string ModelPath = "#@modfolder(NecromancerTome):Resources/necrotechnologist?necroTechnologistPrefab.prefab";
|
||||
|
||||
/// <summary>Высота корня модели над низом блока урны, м (кончик хвоста в модели - на 0.45 м). Подгоняется командой necrogenie.</summary>
|
||||
public static float OffsetY = -0.25f;
|
||||
/// <summary>Высота корня модели над низом блока урны, м. 16.10 в Blender по модели урны: -0.15 («духа чуть приподними»).
|
||||
/// Подгоняется командой necrogenie.</summary>
|
||||
public static float OffsetY = -0.15f;
|
||||
/// <summary>Сдвиг вперёд в системе самого духа, м (16.10: «чуть вперёд, чтобы хвост не просвечивал сквозь урну сзади»
|
||||
/// - загнутый назад кончик хвоста; в Blender 0.06 - ни одной вершины за стенкой, взято 0.07). Поворачивается вместе
|
||||
/// с духом, поэтому хвост всегда в горлышке. Знак проверить в игре: necrogenie fwd.</summary>
|
||||
public static float Forward = 0.07f;
|
||||
/// <summary>Поворот без работы, градусов в секунду.</summary>
|
||||
public static float TurnSpeed = 6f;
|
||||
/// <summary>Покачивание: размах (м) и период (с).</summary>
|
||||
@@ -203,14 +208,14 @@ namespace NecromancerTome
|
||||
{
|
||||
return; // замер как был
|
||||
}
|
||||
Vector3 home = new Vector3(0f, CinerariumGenie.OffsetY, 0f);
|
||||
float yawTarget = _yaw + CinerariumGenie.TurnSpeed * Time.deltaTime;
|
||||
Vector3 home = new Vector3(0f, CinerariumGenie.OffsetY, 0f) + Quaternion.Euler(0f, _yaw, 0f) * new Vector3(0f, 0f, CinerariumGenie.Forward);
|
||||
if (_visitLeft > 0f)
|
||||
{
|
||||
// Туда и обратно по синусу: на полпути - над местом работы, лицом к нему.
|
||||
_visitLeft -= Time.deltaTime;
|
||||
float k = Mathf.Sin(Mathf.Clamp01(1f - _visitLeft / VisitSeconds) * Mathf.PI);
|
||||
Vector3 over = _visit + new Vector3(0f, CinerariumGenie.OffsetY + 0.6f, 0f);
|
||||
Vector3 over = _visit + new Vector3(0f, CinerariumGenie.OffsetY + 0.6f, 0f) + Quaternion.Euler(0f, _yaw, 0f) * new Vector3(0f, 0f, CinerariumGenie.Forward);
|
||||
transform.localPosition = Vector3.Lerp(home, over, k);
|
||||
Vector3 d = _visit - home;
|
||||
if (d.x * d.x + d.z * d.z > 0.01f)
|
||||
@@ -252,7 +257,8 @@ namespace NecromancerTome
|
||||
public override string getHelp()
|
||||
{
|
||||
return "necrogenie - show the current values and how many spirits are on screen\n" +
|
||||
"necrogenie y <m> - model root height above the urn block's bottom (tail tip is 0.45 m above the root)\n" +
|
||||
"necrogenie y <m> - model root height above the urn block's bottom (tail tip is 0.47 m above the root)\n" +
|
||||
"necrogenie fwd <m> - shift along the spirit's own forward (keeps the curled tail inside the neck)\n" +
|
||||
"necrogenie turn <deg/s> - idle turning speed\n" +
|
||||
"necrogenie bob <m> <s> - bobbing height and period\n" +
|
||||
"necrogenie alpha <0-1> - body opacity";
|
||||
@@ -268,6 +274,9 @@ namespace NecromancerTome
|
||||
case "y":
|
||||
CinerariumGenie.OffsetY = v;
|
||||
break;
|
||||
case "fwd":
|
||||
CinerariumGenie.Forward = v;
|
||||
break;
|
||||
case "turn":
|
||||
CinerariumGenie.TurnSpeed = v;
|
||||
break;
|
||||
@@ -287,7 +296,7 @@ namespace NecromancerTome
|
||||
return;
|
||||
}
|
||||
}
|
||||
con.Output("necrogenie: y " + CinerariumGenie.OffsetY.ToString("F2") + ", turn " + CinerariumGenie.TurnSpeed.ToString("F1") +
|
||||
con.Output("necrogenie: y " + CinerariumGenie.OffsetY.ToString("F2") + ", fwd " + CinerariumGenie.Forward.ToString("F2") + ", turn " + CinerariumGenie.TurnSpeed.ToString("F1") +
|
||||
", bob " + CinerariumGenie.BobHeight.ToString("F2") + " / " + CinerariumGenie.BobPeriod.ToString("F1") + " s, alpha " +
|
||||
CinerariumGenie.Alpha.ToString("F2") + "; spirits on screen: " + CinerariumGenie.Live.Count);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user