LevitatingRobot Hi, I'm making a tower defense game and I was trying to figure out a way to form an Area3D around a Path3d that I use for enemies to prevent towers from being placed in the enemies' path. So far the only thing I've found is this video but it only uses CSG Polygons. Unless there is a way to copy a collision polygon's shape I don't know how to form a collision shape for an area around a path. Any ideas?
DaveTheCoder LevitatingRobot Unless there is a way to copy a collision polygon's shape You can do that. For example, a CollisionShape3D's shape property is a Shape3D. If the Shape3D is a ConvexPolygonShape3D, then its points property is a PackedVector3Array containing the polygon vertices.
spaceyjase CSGMesh3D has a 'Use Collision' (doc) property; is this as simple as setting it to true? And if not, get_meshes() returns the Transform and Mesh for the shape, where the mesh can create a collision shape via create_trimesh_shape (doc).
LevitatingRobot spaceyjase that works, but the only issue is that it is registered as a body and not as an area, I'd rather have it be considered an area for multiple reasons.
spaceyjase Understandable. Given the engine can create the shape, and a reference to the mesh, is it possible to copy/assign the shape to an area and later disable the body? The use of layers/masks to remove interactions due to collisions might also help.