pmndrs / react-three-jolt

⚡ Jolt physics in React

Home Page:https://react-three-jolt.pmnd.rs/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

CameraRig: Add rotation based on character movement (AKA Mario Style)

DennisSmolek opened this issue · comments

In an earlier version I had this style working.
The camera would stay in a position and update it's lookAt every frame, when the player moved a set distance from the camera it would move along with it.

Problem is now that we have a PC style fixed rig camera it moves as the anchor moves in XZ space and doesn't rotate.

Quick experiments would accept a counter-rotation based approach where as the player moves value A we counter rotate value B.

I can't tell if the distance would effect the calculations for the counter rotation speed.