www.jpct.net

jPCT-AE - a 3d engine for Android => Bugs => Topic started by: Thomas. on November 14, 2012, 01:27:46 pm

Title: Billboarding and collision detection
Post by: Thomas. on November 14, 2012, 01:27:46 pm
Billboarding is not working if object is used for collision detection.
Title: Re: Billboarding and collision detection
Post by: EgonOlsen 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?
Title: Re: Billboarding and collision detection
Post by: Thomas. on November 14, 2012, 04:14:33 pm
Sorry, I badly formulated sentence. And are you planning fix collision detection on billboarded objects?
Title: Re: Billboarding and collision detection
Post by: EgonOlsen 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.
Title: Re: Billboarding and collision detection
Post by: Thomas. 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 :)
Title: Re: Billboarding and collision detection
Post by: EgonOlsen on November 14, 2012, 09:17:17 pm
Yes, because you don't do it in camera space that way... ;)
Title: Re: Billboarding and collision detection
Post by: Thomas. 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 :)