Skip to content

[third-person-camera] Using existing controls to move an avatar #427

@vincentfretin

Description

@vincentfretin

Create an example similar to
https://8thwall.8thwall.app/navigation-mesh/
using nipple and keyboard controls and respecting the navmesh to move an avatar with a third person view.
This is mainly related to the camera here that needs to follow the avatar, and also rotate the avatar model according to the controls used.

I think movement-controls="constrainToNavMesh:true;controls:keyboard,nipple" on the avatar entity should work with an inactive camera as a child (movement-controls needs a camera as one of the child).
Another component would take care of rotating the avatar model based on the movement direction, probably something to do in movement-controls component so that applies to any controls.

Any of you implemented something like that already? I'll gather any insights you may have.

Also see those threejs libraries related to camera:

Metadata

Metadata

Assignees

Type

No type

Projects

Status

On Hold

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions