BillboardSet and setUserObject

A place for users of OGRE to discuss ideas and experiences of utilitising OGRE in their games / demos / applications.
Post Reply
GangMan
Gnoblar
Posts: 10
Joined: Tue Nov 09, 2004 7:19 pm
Location: Hagenberg, Austria
Contact:

BillboardSet and setUserObject

Post by GangMan »

Hi!

I'm currently working on a small space shooter application. To shoot I'm currently using a mesh-Entity for my laser beams. I then use the IntersectionSceneQuery to check for collisions of the laser with other objects.
This works quite fine.

Then I thought i could gain some performance by exchanging the mesh-based lasers with simple billboards, since this should be enough for my purpose. So that's what I did. Shooting works fine again and it also looks okay. The only problem is that I don't get any results from the IntersectionSceneQuery anymore, so Collisions don't work anymore.

I'm using the approach shown in Oogst's tutorial which means I subclass my own classes from UserDefinedObject. In my objects i use entity->setUserObject(this) or respectively billboardset->setUserObject(this). When I connect the UserObject with mesh, collisions work fine but when i connect it to the billboard set, nothing is detected anymore.

Does this happen on purpose (aren't billboards/billboardsets meant to collide) or is this some sort of bug? Since both Entity and BillboardSet are subclasses of MovableObject they should both produce a movables2movables result in the IntersectionSceneQuery. Am I wrong?

Thx for help and kind regards!

GangMan
User avatar
sinbad
OGRE Retired Team Member
OGRE Retired Team Member
Posts: 19269
Joined: Sun Oct 06, 2002 11:19 pm
Location: Guernsey, Channel Islands
x 67
Contact:

Post by sinbad »

Billboards are excluded from scene queries since their shape is not very representative (for one, they're 2D, and for two the AABB covers all of the items in the set). This has been made more configurable in Dagon due to the MovableObjectFactory changes though.
Post Reply