#!/usr/bin/perl
# Changing the base mass updates the main mass field as well, and
# when mass changes the physics object needs to be informed.
#use Mooix::Thing;
run sub {
	my $this=shift;
	
	if (@_) {
		# Change mass relative to whatever it really is.
		$this->physics->changemass(
			object => $this,
			delta => ($_[0] - $this->_basemass)
		);
		# Set after to update basemass field.
		$this->_basemass(@_);
	}

	return $this->_basemass;
}
