Donate Share

neveredit

Tracker: Bugs

6 Hard to select characters and items when moving Z-axis - ID: 2068987
Last Update: Comment added ( niniendowarrior )

It becomes increasingly difficult to select items when there is a z-axis
motion to the map. The roll over select code seems to be having problems.


niniendo warrior ( niniendowarrior ) - 2008-08-23 04:35

6

Open

None

niniendo warrior

Functionality Problem

current cvs

Public


Comments ( 2 )




Date: 2008-09-13 10:51
Sender: niniendowarrior

Additional notes on the problem.

The check on the objects seem to be dependent on the rows and that the row
has to align to where the x,y component of the object is before it is
checked to see whether or not it should be passed to the ray tracing
collision detection.

This has been a bloody difficult ticket to solve, I'm tempted to move on
for now.


Date: 2008-08-30 00:41
Sender: niniendowarrior


Here's the gist of the problem.

The base plane is [1,1,0] and the normal of the base plane is [0,0,1].

Now, the algorithm goes something like this:
1. project the ray from the mouse point
2. get the point in the base plane. (Note that Z component is always 0
because the base plane sits on the 0 axis).
3. check every creature instance for the X and Y component to see if the
point in the base plane hits the bounding box ranges.
4. given the creature instance, it will go into sphere ray intersection
and if the ray intersects the bounding sphere, highlight it (or if it's
highlighted, do nothing).

The problem with this is if Z-axis is introduced, and if your object is
something like 10 units or more high, the X, Y check will simply return the
creature at the wrong time (when there's no real possibility for the ray to
intersect).

We need to somehow extend this check to the plane it needs to be. We can
first check the base plane, and then check at every plane where there is an
object within that X, Y zone.

This will introduce a performance impact but as of now, I'm not sure how
else to do this.


Log in to comment.

Attached File

No Files Currently Attached

Change

No changes have been made to this artifact.