Schwungus / PNEngine

Fully external 3D engine for GameMaker
MIT License
2 stars 1 forks source link

Player movement and camera prediction #55

Open LocalInsomniac opened 2 months ago

LocalInsomniac commented 2 months ago

For the local player, PlayerPawn virtual functions player_update() and player_update_camera() would be called in a "predicting" state, which will only change the pawn's position then roll back to the last synced position on host tick.

LocalInsomniac commented 1 month ago

Physics

The local Player's Thing gets ticked with f_predicting enabled, which lets the Thing move freely without altering anything in the game world. The variables stored in the predict_host struct are Thing (and ModelInstance if available) variables that can be freely modified during prediction ticks, while anything else will risk a desync.

LocalInsomniac commented 1 month ago

Camera

See #65.