View Full Version : How can i do it to stop when i am running into a tree or something else??
12-02-2000, 09:53 PM
i had progged a 3d Space.
Now I can walk through it, too.
But how do i tell the programm to stop when my gamefigure runs into a tree oder something else.
Please help me!!
12-03-2000, 12:24 AM
That's called COLLISION DETECTION and has so many solution so you should probably search the web for that, the basic idea in all of the implementations I've seen was checking your current position and your desired position and seeing if they are in different side of a polygon. In your case I would create a bounding box or a sphere to the object (in your case the trees) and another one for the player and check their intersection.
I hope my answer is clear to you, if you have any questions ask.
Powered by vBulletin® Version 4.2.2 Copyright © 2016 vBulletin Solutions, Inc. All rights reserved.