aframevr / aframevr/aframe

Bounding boxes incorrectly calculated in first tick

Open
#4,592 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
JavaScript
Stars
17.6k
Forks
4.4k
PR merge metrics
No merged PRs in 30d

Description

In the first tick of a component the bounding box is incorrectly calculated, it looks like it does resemble the size of the object but not the position.

In the following ticks, (each 2 seconds later in my example), the bounding boxes are correct.
see screenshot.

This is a problem since I was writing my own aabb collider , the official one has a bug (issue aabb). But since all the boundingboxes are the same there was a direct hit detection on starting my project.

Screenshot 2020-05-22 at 10 36 17
  • A-Frame Version: 1.0.4
  • Platform / Device: Chrome/OSX
  • Reproducible Code Snippet or URL: codesandbox

Open log to see the error

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the provided CodeSandbox reproduction and inspect the component's bounding-box calculation during its first tick, comparing its position with later ticks. Done means the initial bounding box has the correct position as well as size, while subsequent ticks continue to calculate it correctly.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
computer-graphics, web-dev
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.