Files
neonsr/game_server/game/motion/motion_info.py
Naruse ec8972d5d6 init
2025-04-15 19:36:05 +08:00

23 lines
496 B
Python

from pydantic import BaseModel
from rail_proto.lib import MotionInfo,Vector
class Motion(BaseModel):
x: float
y: float
z: float
rotY: float
def ToProto(self) -> MotionInfo:
return MotionInfo(
pos=Vector(
x=int(self.x*1000),
y=int(self.y*1000),
z=int(self.z*1000)
),
rot=Vector(
x=0,
y=int(self.rotY*1000),
z=0
)
)