From ZDoom Wiki
Jump to navigation Jump to search
Note: This feature is for ZScript only.

void SetOrigin (vector3 newpos, bool moving)


This sets the actor's position. This is similar to SetXYZ, except this function is portal aware and can interpolate.

Note: Interpolation only works if the calling actor is setting its own position, and only after its own super.Tick() has been called, otherwise the function never sees the old position, only the new one. See [this thread] for details.


  • newpos - The new position to go to.
  • moving - If true, the actor is interpolated from the old position to the new. Otherwise, they simply snap into place.


This imp ball always hits. Always.

class CheaterImpBall : DoomImpBall
    override void PostBeginPlay()
        if (target && //ensure that the shooter even has a target
            SetOrigin(,0,*0.5),false); //warp to middle of shooter's target