Xna updating bounding box


So first, we need to create a Bounding Box for each building of our city, and add all Bounding Boxes together in one big array. Start by defining this array: You start by retrieving the width and length of your city, and by creating a List capable of storing Bounding Boxes.

xna updating bounding box-61xna updating bounding box-89xna updating bounding box-1xna updating bounding box-79

Now run this code, and make sure you crash as soon as possible to try out your new code! hello, i try to follow lines above and also xna wiki: how to render bounding box. Problem is following: when i try to render bounding box box House = new Bounding Box(new Vector3(0,0,0), new Vector3(10,20,40)); i always get error: on these lines: graphics Device. From these points you create a Bounding Box which you store in the complete City Box variable. Put this code at the end of the Set Up Bounding Boxes method: Vector3[] boundary Points = new Vector3[2]; boundary Points[0] = new Vector3(0, 0, 0); boundary Points[1] = new Vector3(city Width, 20, -city Length); complete City Box = Bounding Box. : I don't see anything wrong with the Update Bounding Box method except that the 1st line is mostly redundant and could be replaced with just Vector3.center; So I would say the error is in the code where you initially create the bounding box. I've been using maya for a couple of years, but only just started using it for games.

You must have an account to comment. Please register or login here!