Author Topic: Billboarding and collision detection  (Read 4970 times)

Offline Thomas.

  • double
  • *****
  • Posts: 833
    • View Profile
Billboarding and collision detection
« on: November 14, 2012, 01:27:46 pm »
Billboarding is not working if object is used for collision detection.
« Last Edit: November 14, 2012, 01:37:32 pm by Thomas. »

Offline EgonOlsen

  • Administrator
  • quad
  • *****
  • Posts: 12295
    • View Profile
    • http://www.jpct.net
Re: Billboarding and collision detection
« Reply #1 on: November 14, 2012, 02:56:58 pm »
It's actually the other way round...you can't really do collision detection properly on bill boarded objects. That's by design. I'm not sure what you mean with the opposite...do you have some test case for this?

Offline Thomas.

  • double
  • *****
  • Posts: 833
    • View Profile
Re: Billboarding and collision detection
« Reply #2 on: November 14, 2012, 04:14:33 pm »
Sorry, I badly formulated sentence. And are you planning fix collision detection on billboarded objects?

Offline EgonOlsen

  • Administrator
  • quad
  • *****
  • Posts: 12295
    • View Profile
    • http://www.jpct.net
Re: Billboarding and collision detection
« Reply #3 on: November 14, 2012, 08:25:46 pm »
Actually no. I don't consider this to be a bug. Billboarding happens in camera space but collision detection happens in world space (well, actually it happens in ellipsoid space, but that's another story...) and given the position in world space, it works correct even on bill boarded objects....it's just different from what one might expect.
I had the same issue in my RPG with picking of the flowers. I'm using a collision mesh instead.

Offline Thomas.

  • double
  • *****
  • Posts: 833
    • View Profile
Re: Billboarding and collision detection
« Reply #4 on: November 14, 2012, 09:13:51 pm »
The plane with billboarding is collision mesh... I thought that this will not be supported, so I implemented billboarding myself and it works exactly as I want :)

Offline EgonOlsen

  • Administrator
  • quad
  • *****
  • Posts: 12295
    • View Profile
    • http://www.jpct.net
Re: Billboarding and collision detection
« Reply #5 on: November 14, 2012, 09:17:17 pm »
Yes, because you don't do it in camera space that way... ;)
« Last Edit: November 14, 2012, 10:24:56 pm by EgonOlsen »

Offline Thomas.

  • double
  • *****
  • Posts: 833
    • View Profile
Re: Billboarding and collision detection
« Reply #6 on: November 14, 2012, 09:38:46 pm »
Yes, I'm computing camera angles, clear object rotation and rotate object, for my needs it works :)