voxel / voxel-clientmc

Minecraft client using WebSockets and voxel-engine (voxel.js plugin)
55 stars 13 forks source link

Head rotation (player yaw/pitch) #19

Open deathcap opened 8 years ago

deathcap commented 8 years ago

Web users can move around the world (position coordinates), but their head direction is not updated:

screen shot 2016-02-06 at 6 04 35 pm

Relevant packets: entity_move_look (x,y,z are handled, but not yaw and pitch), entity_head_rotation (headYaw), position_look (yaw and pitch fields)

Requires wiring up to the voxel.js client camera, may also need changes to mineflayer but should be able to use the bot.look(yaw, pitch, [force], [callback]) API: https://github.com/PrismarineJS/mineflayer/blob/master/doc/api.md#botlookyaw-pitch-force-callback

deathcap commented 8 years ago

The client does reposition its head, but only to look at the target block when digging (part of mineflayer)