Disclosed is a method of determining a position and/or orientation of an object in a virtual environment. The method includes representing the object as a plurality of segments. The method also includes receiving input signals based at least in part on commands of a user indicative of a desired motion of the object. A movement of the object in the virtual environment is then determined in response to the input signals. The determining includes determining a movement of at least a subset of the segments in response to the input signals and detecting whether any of the segments of the subset impact a wall of the virtual environment. If and impact is determined, a direction of motion of the segment following the impact is determined by combining data representing each wall being impacted and resolving to determine an escape direction for the segment. Movement of the object is represented by addition or subtraction of segments at the tip of the object.