KinkSteering = {};

function KinkSteering.prerequisitesPresent(specializations)
    return true;
end;

function KinkSteering:load(xmlFile)
    self.kinkEnabled = Utils.getNoNil(getXMLBool(xmlFile, "vehicle.isKinkSteered#value"), false);
	self.kinkJoint = Utils.getNoNil(getXMLInt(xmlFile, "vehicle.kinkSteering#kinkJoint"), 0);
	self.kinkOrientation = Utils.indexToObject(self.components, getXMLString(xmlFile, "vehicle.kinkSteering#wheelOrientation"));
end;

function KinkSteering:delete()
end;

function KinkSteering:mouseEvent(posX, posY, isDown, isUp, button)
end;

function KinkSteering:keyEvent(unicode, sym, modifier, isDown)
end;

function KinkSteering:update(dt)
	if self.isMotorStarted then
		if self.kinkEnabled and self.kinkJoint ~= 0 then
			setJointFrame(self.componentJoints[self.kinkJoint].jointIndex , 0, self.componentJoints[self.kinkJoint].jointNode);   
			local x, y, z = getRotation(self.kinkOrientation);	    
			setRotation(self.kinkOrientation, 0,y,0);
		end;
	end;
end;

function KinkSteering:draw()   

end;

function KinkSteering:onLeave()
	
end;

function KinkSteering:onEnter()
end;
