Skip to content
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

Merged
merged 10 commits into from
Apr 10, 2018
Merged

aframe-extras navmesh #113

merged 10 commits into from
Apr 10, 2018

Conversation

InfiniteLee
Copy link
Contributor

@InfiniteLee InfiniteLee commented Mar 27, 2018

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

… 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;
@InfiniteLee
Copy link
Contributor Author

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;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What's this?

Copy link
Contributor

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"
Copy link
Contributor

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.

//copied from aframe-extras movement-controls
if (this.velocity.lengthSq() > EPS) {
let start = root.position;
end.copy(this.velocity).multiplyScalar(dt / 1000).add(start);
Copy link
Contributor

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.

@InfiniteLee InfiniteLee merged commit a94ac18 into master Apr 10, 2018
@brianpeiris brianpeiris deleted the feature/aframe-extras-navmesh branch September 24, 2018 17:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Need to hide nav mesh in environments
3 participants