question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Ray collision fails when origin in a face

See original GitHub issue

Hi,

When I cast a ray with origin point inside the face of a Mesh, it won’t detect a collision. Quick example (a modified version of examples/canvas_interactive_cubes.html from r45): https://gist.github.com/1366114

Noting that,

var V = THREE.Vector3;

changing the line 159 of the gist, from

var origin = new V(20, 20, 20);

to

var origin = new V(19.5, 19.5, 19.5);

shows that the collision will work fine.

Issue Analytics

  • State:closed
  • Created 12 years ago
  • Comments:8 (8 by maintainers)

github_iconTop GitHub Comments

1reaction
mrdoobcommented, Jan 28, 2017

@kevanstannard Seems to be. Thanks!

1reaction
kevanstannardcommented, Jan 26, 2017

@mrdoob do you think this might be resolved now? I created a simple test and it seems to be working correctly, but not sure if I understood the original problem properly.

https://jsfiddle.net/sveom5ay/1/

Read more comments on GitHub >

github_iconTop Results From Across the Web

Ray casting collision detection fails during character rotation. - Unity ...
I have a character that is basically an oblong block that can rotate and move forward in the direction it faces. I am...
Read more >
Raycast stops detecting when origin is too close to object
To do this, you must add BoxCollider to your GameObject Item and activate IsTrigger. Then add the tag "Player" to your FPS Controller....
Read more >
most efficient AABB vs Ray collision algorithms
To anyone using the "branch-less approach", be warned that it will fail if the ray's origin starts along one of the planes of...
Read more >
Ray-triangle intersection: geometric solution - Scratchapixel
Figure 1: intersection of a ray and a triangle. The triangle lies in a plane. The value t is the distance from the...
Read more >
Physics - Raycasting - research.ncl.ac.uk; ; Newcastle University
an infinite line heading outwards from the ray's origin in space - the purpose of ... [xy,yy,zy] will face upwards, and [xz,yz,zz] will...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found