Skip to content

Colworld only works with spheres checking against Oriented bounding boxes #8

Description

@EvanSkiStudios

For a few weeks I've been trying to get the latest of this to work with my project
all my objects currently are AABB

but no collisions at all are detected in the col world

I set up the col world using the exact same lines of code from the 3DCollisionTestWorld
except im using the octree instead

var bounds = NewColAABBFromMinMax(new Vector3(-2000, -2000, -25), new Vector3(2000, 2000, 250));
var octree = new ColWorldOctree(bounds, 3);
collision_world = new ColWorld(octree);

for reference my player is like so

shape = NewColAABBFromMinMax(new Vector3(self.x - 4, self.y - 4, 0), new Vector3(self.x + 4, self.y + 4, 16));
player_object = new ColObject(shape, self.id, 1, 1);
collision_world.Add(player_object);

and my wall objects are likewise

shape = NewColAABBFromMinMax(
	new Vector3(self.x, self.y, 0),
	new Vector3(
	self.x + 32,
	self.y + 32,
	32
);
wall_object = new ColObject(shape, self.id, 1, 1);
collision_world.Add(wall_object);

and the player check is as simple as

if (collision_world.CheckObject(player_object)){
  show_message("Hello world");	
}

and I get nothing

it wasnt until changing the player to a sphere and the walls to OBBs that any collision was registered at all

Sorry if this isnt the correct place to report issues but i didnt know of another way of brining it to your attention
i can provide any other info if necessary as well

thanks

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions