utils datapack to Control Entities in Third Person, with WASD, Jump and Sneak controls!
The Third Person Control is a part/main module of the datapack which allows players to control entities with WASD. It takes player input via the new Player Input predicates and calculates and applies Motion Vector into the Motion NBT of the entity. The datapack also allows players to spectate entities (in third person). The camera positions are initialized in tpc:gb/load. All entities seen in that function file are controllable with WASD, jump and sneak. Some entities have special controls, like the entities which can fly can gain altitude with holding down jump.
/function tpc:summon {entity:"armor_stand"}/function tpc:spectate {tag:"temp_tag"}/function tpc:spectate_random {sub_tag:"temp_tag"}/function tpc:removeThe Camera Interpolate Module allows users to interpolate to a specific 'X' and 'Y' rotation, with a particular 'SPEED' value. When the command is ran, the player camera will find the shortest path to the given rotation coordinates and interpolate and the provided speed. The Module also allows players to switch from Controlling the Entity to Spectating It. When Spectating the Entity, their Camera will randomly interpolate to a random direction every 10 seconds.
/function camera:interpolate {"x":10,"y":30,"speed":200} // Greater the Speed Value, Slower the Interpolation./function camera:interpolate_random/function camera:toggle_control