-
Notifications
You must be signed in to change notification settings - Fork 1.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
aframe-extras navmesh #113
Conversation
… replaced nav-mesh with new, much smaller one generated with blender navigation mesh tool; limiting teleport to navmesh; moved duck to be closer to edge of table;
Tried using having a detached part of the navmesh for the table and the shelf in the back of the room, but appears to be unsupported in the pathfinding library. |
root.position.copy(clampedEnd); | ||
root.position.x += this.velocity.x * dt / 1000; | ||
root.position.y += this.velocity.y * dt / 1000; | ||
root.z += this.velocity.z * dt / 1000; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What's this?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This whole second applicaiton of velocity looks to be a copy/paste typo https://github.com/donmccurdy/aframe-extras/blob/master/src/controls/movement-controls.js#L124
src/room.html
Outdated
@@ -168,7 +168,7 @@ | |||
class="left-controller" | |||
hand-controls2="left" | |||
tracked-controls | |||
teleport-controls="cameraRig: #player-rig; teleportOrigin: #player-camera; button: action_teleport_" | |||
teleport-controls="cameraRig: #player-rig; teleportOrigin: #player-camera; button: action_teleport_; collisionEntities: #floor-nav" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: wrap the properties now that the component values are rather long.
# Conflicts: # src/room.html
# Conflicts: # src/components/character-controller.js # src/hub.html
//copied from aframe-extras movement-controls | ||
if (this.velocity.lengthSq() > EPS) { | ||
let start = root.position; | ||
end.copy(this.velocity).multiplyScalar(dt / 1000).add(start); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Velocity is already applied above, root.position
is already the target position we are trying to move to.
added aframe-extras navmesh/pathfinding for our character-controller; replaced nav-mesh with new, much smaller one generated with blender navigation mesh tool; limiting teleport to navmesh; moved duck to be closer to edge of table;
Fixes #97