Game Development Community

Getting collision poly coords?

by Teck Lee Tan · in Torque Game Builder · 09/15/2005 (12:54 pm) · 2 replies

Okay, so I know you can find the number of vertices of a collision poly for any given scene object. Is there any way to get the coords of said vertices? I'm basically looking for a way to getsome relatively cheap pathfinding without having to fiddle with A* or some such algorithm, and using an obstacle's collision poly to generate "waypoint helpers" (for lack of a better term) seems like it should work nicely, at least on paper and in my non-programmer head.

If not, is there any chance this could be an additional function? Alternatively, anyone wanna help me figure this out in source code? I have relatively limited experience with C++.

edit: I should probably add, just in case, that this would be for irregularly-shaped objects, since getting the coords for uniform collision polies would be fairly simple.

#1
09/15/2005 (1:46 pm)
Wouldn't it be easier to just put scene objects markers (empty objects without collisions, rendering, and so forth) in the scene where you need these waypoints to be? You could even mount them to something else and still be able to get their world-space posititions.
#2
09/15/2005 (7:59 pm)
That was one of the things I was thinking of. My main reasoning behind this was that if I were to have an inordinate number of irregularly shaped obstacles strewn about the map, I'd really like a procedural method of dropping the waypoint helpers down, maybe at runtime or compile time? And by waypoint helpers, what I really meant was obstacle avoidance waypoints.

Mind you, I'm rather new to pathfinding and the like, and have simply been reading up on things. Also, just so there's no confusion, at this point above pathfinding stuff is mostly in the brainstorming stage.