Now, when I tried to implement rotation to this method, everything broke. If (lliding(aabb) & aabb.COLLIDER_TYPE.equalsIgnoreCase("collider"))Įlse if (!lliding(aabb) & z = maxZ) Int maxZ = (int) (() - moveSpeed - boundingBoxDepth) + 1 ĪxisAlignedBoundingBox aabb = WarmupWeekend.getInstance().currentLevel.getAxisAlignedBoundingBoxAt(new Vector3f((), (), z)) ĪxisAlignedBoundingBox potentialCameraBB = new AxisAlignedBoundingBox(this, "collider", new Vector3f((), (), z), boundingBoxWidth, boundingBoxHeight, boundingBoxDepth) (The code below is a sample of checking for collisions in the Z axis) for (int z = (int) (()) z > () - moveSpeed - boundingBoxDepth z-) I have a problem with my current collision implementation.Ĭurrently for player collision, I just use an AABB where I check if another AABB is in the way of the player, as shown in this code.
0 Comments
Leave a Reply. |