Page 3 of 3

Re: Boulders from asteroids question(s)

Posted: Tue Mar 08, 2011 6:14 am
by Thargoid
Ahruman wrote:
Commander McLane wrote:
Perhaps it is. I'm not sure whether a subentity can spawn something. Perhaps it can't.
Calling spawn on a subentity spawns objects near the witchpoint, as the subentity’s position is in parent-relative coordinates. This is half-fixed in r4442 by treating it as if spawn() had been called on the mother. This is imperfect because it uses the mother’s origin and radius, but doing it right would be too complex for MNSR (apparently we don’t have an absolutePosition method for subentities yet!).
There's a little function to do that built into Aquatics (in the HammerHead script), courtesy of Eric. I posted it recently in reply to something McLane was doing so a quick hunt should reveal it. It's a quite simple function and works well to translate sub-ent positions to global ones (the sleds use it when switching from sub-ents to separate entities).