# 'how to' questions..

## Recommended Posts

jamesss    100
1)how to write name over a 3d character, sprites? DrawText? 2)how to do boundingbox collision between two Model what is the steps? 3)what is the steps of dividing terrain with Quadtree ,how to create Qaudtree Triangle?

#### Share this post

##### Share on other sites
Dom_152    476
1) I guess one method would be to render the text to a texture and then map the texture to a quad positioned over your character.

2) You would need to learn about Bounding Volumes and the maths involved there. You should check to see if one models BB intersects with another and then act upon that. This article on WikiPedia may help you and don't forget to search to find many other resources.

(Disclaimer: I may not be correct with this answer as I am still learning about Quadtrees and Octrees myself so I do recommend you research it yourself as well)

3) The idea with Quadtrees are to continually divide the geometry into quadrants until a certain condition is satisfied. In the case of terrain division you would want to keep dividing until each quadrant has a certain number of polygons, maybe 2000 per Quadrant for example. Again you can find much more detailed information if you search. There are plenty of resources out there.

#### Share this post

##### Share on other sites
jamesss    100
Thank you Dom_152

#### Share this post

##### Share on other sites
lightbringer    1070
1) You can render to texture and billboard like Dom_152 said, or you could find the location of the head in screen space and draw the text there.

2) Depends on whether the boxes are axis aligned or oriented. Spheres are easiest, just check if the distance between the centers is greater than the sum of the radii (using squares can save you some square roots here). Either way, there's no magic involved, just find a collision algorithm and implement it. You'll probably spend more time on spatial division to reduce the number of collision checks to a reasonable amount.

3) I know less about this than Dom_152 :)

#### Share this post

##### Share on other sites
Hnefi    386
If you're using OBB's (bounding boxes that are oriented to fit the object as well as possible) you should use the separating axis theorem. It can be a bit tricky to implement at first, but is pretty fast.

## Create an account or sign in to comment

You need to be a member in order to leave a comment

## Create an account

Sign up for a new account in our community. It's easy!

Register a new account

## Sign in

Already have an account? Sign in here.

Sign In Now