View Full Version : how to prevent to through a wall or shape?
12-16-2003, 06:37 AM
I want to stop at cube suface while I am zooming. I dont want to go through the cube like a walking through a wall. Can you tell what is best possible solution for this. Thank you in advance.
12-16-2003, 07:56 AM
You need collision detection for this feature.
Your simplest approach is to define a sphere with a diameter equal to cube side, and then a sphere of the size of the viewer avatar(ie imaginery viewer). Then check to see if the two spheres intersect. Google for this topic, there are way too many issues to cover in thread, and plenty of source code to show you how to do it online.
Powered by vBulletin® Version 4.2.0 Copyright © 2013 vBulletin Solutions, Inc. All rights reserved.