Game Development Community

Blender, the hitbox resource, and player bounds

by Daniel Buckmaster · in Artist Corner · 04/05/2008 (10:04 am) · 21 replies

This resource, for the record.

I'm trying to get this working with an extremely simple player model made in Blender. One issue is that my Bounds object never seems to be exported, and the second is that the resource doesn't work :P I'll tackle them one at a time :P

My 'player' model is pretty simple and stupid: two cubes, each with a different material and UV texture, each enclosed by another box which I use for collisions. Both boxes are enclosed by a 'Bounds' box, which is another cube with no material. The two boxes export nicely, and when I name the collision boxes col0 and col1, they work well in the engine. LoD works. However, the bounding box of the shape when used as a Player is the default sized box, rather than my Bounds object. I see no reference to Bounds being exported in the log file, either. I've tried parenting it under one of the detail nodes, under the shape node, and not parenting it at all.

Next problem :P. I've installed Davide Archetti's hitbox resource, and it compiles fine. I renamed my collision boxes to HB01_32 and HB02_32, and they're being found and put into the array. However, nothing collides with them. I thought the problem might be the bounds box created by the Player class - the Player bounds box only intersects with my hitboxes in a small area, so it would only be that area that registers hits (since the check for hitboxes comes after the bounding box check). However, I've tried shooting in that location, but still no dice.
I've debugged and tracked the problem down to MeshObjectInstance::castRayEA. At the start of that method, *meshList is referred to. However, I find that meshList is always null.

About the author

Studying mechatronic engineering and computer science at the University of Sydney. Game development is probably my most time-consuming hobby!