Resolve proxy world position via ModelToWorld
Proxy sub-objects report model-space coords; convert with house.ModelToWorld so the synced ws is true world space - globally unique per proxy instance (needed for per-object cooldown/state keying) and usable as a spawn position. Both the map1 and map2 resolution paths now return world coords consistently. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
parent
89f42a04b0
commit
6d7242f6b8
1 changed files with 5 additions and 2 deletions
|
|
@ -98,7 +98,10 @@ class YAProxyActionBase : ActionContinuousBase
|
|||
string name1;
|
||||
if (house.YA_GetProxyMap1().Find(wKey, name1) && YA_KeywordMatch(name1, kw))
|
||||
{
|
||||
ws = target.GetObject().GetWorldPosition();
|
||||
// Proxy sub-objects report model-space coords; convert to true world
|
||||
// so the value is globally unique (state keying) and usable as a spawn
|
||||
// position. (Same conversion ZPF uses.)
|
||||
ws = house.ModelToWorld(target.GetObject().GetWorldPosition());
|
||||
return name1;
|
||||
}
|
||||
|
||||
|
|
@ -121,7 +124,7 @@ class YAProxyActionBase : ActionContinuousBase
|
|||
}
|
||||
if (bestName != "")
|
||||
{
|
||||
ws = house.GetPosition() + bestLS;
|
||||
ws = house.ModelToWorld(bestLS);
|
||||
return bestName;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue