@Override
	protected void createEffect( NormalSpaceObject object, int delta ) {
		Shape shape = ((SpaceObject)object).getShape(); 
		Speed currentSpeed = object.getMotion().speed;
		Float currentDirection = (float) currentSpeed.getDirection().getTheta();
		
		if( currentSpeed.getValue() == 0 ) {
			return;
		}
		
		if( ( shape.getMinX() <= 0 && Util.isInRange( currentDirection, 90, 270 ) ) ||
			( shape.getMaxX() >= this.width && Util.isInRange( currentDirection, 
			                                              270, 360, 0, 90 ) ) ) {
			// hits left or right side - allow only y movement
			currentSpeed.projectSpeed( new Vector2f( 0, 1 ) );
		} 
		if( ( shape.getMinY() <= 0 && Util.isInRange( currentDirection, 180, 360 ) ) ||
		    ( shape.getMaxY() >= this.height && Util.isInRange( currentDirection, 0, 180 ) ) ) {
			// hits top or bottom - allow only x movement
			currentSpeed.projectSpeed( new Vector2f( 1, 0 ) );
		}
		// ps. in case of both ifs are true the object won't move at all
		
		object.getMotion().speed = currentSpeed;
	}