dofile( "data/scripts/lib/utilities.lua" )

local entity_id = GetUpdatedEntityID()
local vel_x, vel_y = GameGetVelocityCompVelocity( entity_id )
local pos_x, pos_y, currentRotation = EntityGetTransform( entity_id )

if vel_x < 0 then
	EntitySetTransform(entity_id,pos_x,pos_y,currentRotation,1,-1)
else
	EntitySetTransform(entity_id,pos_x,pos_y,currentRotation,1,1)
end