SetOrigin
Usage
SetOrigin sets the actor's world coordinates to the specified position. Unlike SetXYZ, SetOrigin automatically relinks the actor to the blockmap and sectors.
Parameters
- 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.
Examples
This imp ball always hits. Always.
class CheaterImpBall : DoomImpBall { override void PostBeginPlay() { super.PostBeginPlay(); if (target && target.target) //ensure that the shooter even has a target SetOrigin(target.target.pos+(0,0,target.target.height*0.5),false); //warp to middle of shooter's target } }
This article is issued from Zdoom. The text is licensed under Creative Commons - Attribution - Sharealike. Additional terms may apply for the media files.