Results 1 to 7 of 7

Thread: Ray test mouse picking step size

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #5
    Quote Originally Posted by SilverWarior View Post
    Instead of checking if your ray is intersecting each world cube you have divided your world into multiple planes based on Z axis position and now you are simply checking ray collision with each individual Z plane.
    I want to check intersection of a vector with world cubes.

    If I was to test every world cube for intersection, it would be more steps than just starting from the camera and traveling along the vector until the first intersection is found. But, it is possible to miss a cube if the ray only intersects with tiny slice of a corner of that cube if the step is too high.

    Anyway don't worry about it. I'll google it.



    Update:

    All the stuff I find is for testing if ray and AABB intersect. That is counter intuitive to me since we do not know which AABB to test for and looping all of them, or even fraction of them would be way too many. I want rather to travel along the ray and see what AABBs are getting intersected, something like Bresenham's line generation but in 3D. But it does take input parameter 'Resolution' so I'm not nuts. In fact:

    For the mathematically challenged (meaning me, until I looked it up), Bresenham's algorithm is a neato and efficient way to enumerate all of (actually "most of") the points between two endpoints.
    So there it is. I want to know how it would return all the points and not just "most of".

    Also, don't worry about it. I'll google it. It's just that keeping a journal helps
    Last edited by Thyandyr; 16-10-2017 at 11:32 PM.

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •