New answers tagged bounding-boxes
1
during my experiments with HTML5 canvas and AABB I found exactly what you are experiencing. This did happen when I attempted to make a platform from adjacent boxes of 32x32 pixels.
Solutions I attempted by order of my personal preference
1 - Divide movements by axis
My current one, and I think I will continue my game with it. But be sure to check what I ...
3
I would combine the platform tiles into a single platform entity.
For example, say you take the 3 tiles from the pictures and combine them into a single entity, your entity would have a collision box of:
Left = box1.left
Right = box3.right
Top = box1.top
Bottom = box1.bottom
Using that for collision will give you the y as the least penetrating axis ...
0
Problems like these are common with new collision detection methods.
I don't know too much about your current collision setup, but here is how it should go:
First off, make these variables:
Make a X and Y velocity
Make a Gravity
Make a jumpSpeed
Make a isJumping
Second off, make a timer to calculate
the delta to affect the velocity of
the object.
...
2
Depends on which type of bounding box you're talking about.
Axis-aligned bounding cubes are one of the fastest ways to do a rough first-pass collision test, before sending those that pass to a more precise collision check. Edit: This is especially true when you have multiple moving objects that may collide with one another.
Oriented bounding cubes require ...
1
The problem is is the order of your constructors. This works correctly. I put all the negative static Vector3 values into the min, and the positives into the max.
BoundingBox b = new BoundingBox(
Vector3.Left + Vector3.Forward,
Vector3.Backward + Vector3.Up + Vector3.Right);
BoundingBox bb = new BoundingBox(
Vector3.Left / 2 + Vector3.Forward / 2,
...
Top 50 recent answers are included
