Nez.Collider.setLocalOffset C# (CSharp) Method

setLocalOffset() public method

localOffset is added to entity.position to get the final position for the collider. This allows you to add multiple Colliders to an Entity and position them separately.
public setLocalOffset ( Vector2 offset ) : Collider
offset Vector2 Offset.
return Collider
		public Collider setLocalOffset( Vector2 offset )
		{
			if( _localOffset != offset )
			{
				unregisterColliderWithPhysicsSystem();
				_localOffset = offset;
				_localOffsetLength = _localOffset.Length();
				_isPositionDirty = true;
				registerColliderWithPhysicsSystem();
			}
			return this;
		}