Hosting and domain costs until October 2024 have been generously sponsored by dumptruck_ds. Thank you!

setorigin

From Quake Wiki

void setorigin(entity e, vector newPos)

Usage[edit]

Sets the entity's position. This should be used over setting origin manually since it will properly relink the entity into the world. This can also be used as an easy way to relink an entity after changing their solid type by passing their current position.

Parameters[edit]

  • e
The entity to set the origin of.
  • newPos
The new location to place the entity.

Example[edit]

makevectors([-e.angles.x, e.angles.y, e.angles.z]);

// Move the entity 32 units forward in the direction it's facing
setorigin(e, e.origin + v_forward*32);