# Kinematics

Instead of relying on physics parts for moving platforms and rotating objects, it's way more efficient to manually set their cframe per frame, along with modifying the assemblylinearvelocity and assemblyangularvelocity too. This can be done on either the server or client and works fairly well. Code below of change in cframe to set velocity and angular velocity

```lua
local DeltaPosition = CurrentCFrame.Position - LastCFrame.Position
local DeltaRotation = CurrentCFrame.Rotation * LastCFrame.Rotation:Inverse()
local x, y, z = DeltaRotation:ToEulerAngles()
local AngleDeltas = Vector3.new(x, y, z)

local PosVel = DeltaPosition / DeltaTime
local AngleVel = AngleDeltas / DeltaTime
```
