Jump to content

  • Log In with Google      Sign In   
  • Create Account

We're offering banner ads on our site from just $5!

1. Details HERE. 2. GDNet+ Subscriptions HERE. 3. Ad upload HERE.


ManagedJack

Member Since 13 Mar 2006
Offline Last Active Mar 29 2012 05:59 AM

Posts I've Made

In Topic: Billboard sprite hit testing: help wanted...

04 December 2006 - 04:45 AM

Thanks, jrmcv,

meanwhile I found a suitable way:


  • Get 3D coordinates of billboard sprite edges (glad to be using only rectangles!)

  • Create plane according to a discussion at Google.

  • Find the intersection point of the current ray with this plane.

  • Determine if the intersection point resides within the rectangle.



I wonder if it is my fault or if the given hints on of Google discussion are incomplete. I think you need at least 4 dot products to determine if the intersection point is within a rectangular area.

Thanks,

Jack

In Topic: Billboard sprite hit testing: help wanted...

03 December 2006 - 09:01 PM

Hi again,

@Galaximo: You might be right. But I still think this must be quite a common problem. I'd have assumed that there is a special trick to do it with DirectX (a Sprite.GetIntersection(.) method?). But meanwhile I'll search the Math forum for planes and rays...

Thanks, jrmcv, it seems the proposal you made is a bit costly in regard to performance, but I'll have to give it a try if there is no other choice.

Jack

PARTNERS