CLOSE
by Tim Tebow · in Torque Game Builder · 03/22/2009 (11:46 am) · 4 replies
--
About the author
#2
I want to create a collision structure like pacman. When I do and click save it says "Polygon is not convex, save convex hull instead?" I don't want to save it as a convex hull because that takes my lines and converts them to the pellet.
03/22/2009 (1:25 pm)
The problem with the pacman is this ->I want to create a collision structure like pacman. When I do and click save it says "Polygon is not convex, save convex hull instead?" I don't want to save it as a convex hull because that takes my lines and converts them to the pellet.
#3
So if you want to make Pac-Man and have his mouth hole not collide make two scene objects, one with a collision polygon that looks like his top half, one that looks like his bottom, then mount them, and you have proper collision.
03/23/2009 (2:37 pm)
Since the collision polygon has to be convex one way I've seen to get around this is to use a few different polygons to create a concave type of effect. Basically make a few scene objects with their own collision polygons and mount them to the object. I've never done this, but I've seen it mentioned on the boards. So if you want to make Pac-Man and have his mouth hole not collide make two scene objects, one with a collision polygon that looks like his top half, one that looks like his bottom, then mount them, and you have proper collision.
#4
03/23/2009 (2:57 pm)
--
Torque Owner Deozaan
Yes. Go into the Collision Polygon editor and click the "Replace Points with Convex Hull" button. It looks vaguely like Pac-Man about to eat a power pellet, with an arrow pointing from Pac-Man to the pellet.
Use the AI you use for the player. For example, if you're using A*:
Client 1: Moves his character (using A* pathfinding to navigate past walls) and informs the server.
Client 2: Is informed about the new location/destination of Client 1 and invokes A* pathfinding function(s) to move Client 1's character around the walls to the destination point.