【坐骑】修复人物变高的问题

dev_chengFeng
gaoxin 2021-11-01 16:42:46 +08:00
parent 10bfe9a7b7
commit c62c0bc549
1 changed files with 2 additions and 2 deletions

View File

@ -414,11 +414,11 @@ function PlayerLiveView:SetRideOffset(dir)
local offset = {0, 0}
-- 有坐骑时
if self.PlayerLiveViewData.ride and self.PlayerLiveViewData.ride > 0
and self.RideConfig and self.RideConfig.RideOffset then
and self.RideConfig and self.RideConfig.RideOffset and self.RideConfig.RideOffset[dir] then
offset = self.RideConfig.RideOffset[dir]
end
if self.RidePosition then
self.rideLiveGo.transform.localPosition = Vector3.New(self.RidePosition.x + offset[1], self.RidePosition.y + offset[2], self.RidePosition.z)
self.rideLive.transform.localPosition = Vector3.New(self.RidePosition.x + offset[1], self.RidePosition.y + offset[2], self.RidePosition.z)
end
end
--界面销毁时调用(用于子类重写)