 Rewrote the flow control based on the number of corners in the collision
 Inoformation found at:
 Check to see if there are faces in the collision
 If so is it a face from A or a face from B or both
 for each side face toethe reference face
 liip over the incident face and clip it to within those faces
 test the resulting points against the refenerence face itself to find those points INSIDE the reference face
 Solve the collision for each of those points
 for each side face toethe reference face
 If so is it a face from A or a face from B or both
21/08/2017 – OBB to OBB Collision Point research
 http://www.randygaul.net/2014/05/22/derivingobbtoobbintersectionsat/
 http://box2d.org/
 http://xboxforums.create.msdn.com/forums/t/2642.aspx
 http://slideplayer.com/slide/7468795/
20/08/2017 – Corner Selection in OBB Collision
 Added some flow control based on the number of points in each of AsCollisionPoints and BsCollisionPoints so that i can give an accurate representation of thecollision point
19/08/2017 – OBB Collision Point
 Currently is set to output 0,0,0 so that teh point is set
 when two cubes collide the corners that make up that collision seem to be incorrect
 In some instanced a cube will have 7 corners in the collision, which is impossible
 TEST: swapping the min and max
 so that instead of a having a min value it will Have the Max value
 Incorrect
 Issue is that the first corner will always be the closest corner
 So if the corners furthest away from the collision are processed first they are added into the collision
 SOLVED by clearing the list of collision points for that object when a new closest projection distance is found
 Debugging still doesnt look right

 Vertical lines originate at the corners in the collision (precollision resolution)
 Magenta are from cube B (pink)
 Cyan are from cube A (Yellow)
 Horizontal lines show the overlap of the objects along the collision normal
 White is the collision normal from B – Could be incorrect fr the purposes of the debugging
 Green is the maximum length along that line that a corner of B is
 which is why it stops vertically below the magenta line
 Red is the minimum length of A along that line
 ISSUE that it does not stop vertically below the cyan lines
 Vertical lines originate at the corners in the collision (precollision resolution)

 TEST each of the collision types for appropriate number of corners
 1v1 – corner to corner
 Fail
 1v2 – corner to edge
 Fail – uses corners on the wrong side of the shape
 1v4 – corner to face
 Pass
 SEE IMAGE ABOVE
 2v2 – edge to edge
 Fail – uses the corners on the wrong side of the shape
 2v4 – edge to face
 Pass
 4v4 – face to face
 Pass
 1v1 – corner to corner
17/08/2017 – CORNERS SOLVED
 After tinkering with the code for over two weeks
 Matrix method seemed the most accurate and tehrefore the most likely to be the fastest to improve on
 The corners were rotating too fast and on the world XYZ axis system
 Problem was solved by:
 Making the angles correct for the timestep
 Rotating the corner into an axis aligned position
 performing the rotation
 Rotating it back into its original orientated position
15/08/2017 – Corner Code Review
 Going over all rpevious written code to check for errors relating to the rotation of the corners
 Applying a quaternion rotation works as epected.
 Created Functions for normalising a quaternion
 Including one for calculating the magnitude of a quaternion
 Created functions for rotations of different types
 Quaternion
 Matrix4x4
 Euler angles
 With these new functions tested
 Quaternion and matrix4x4 work as expected for a stationary object
 Rotation matrix created from euler angles does not work as expected for a stationary object
 Quaternion and matrix4x4 work as expected for a stationary object
 Neither work with the current methods of calculating rotating objects
11/08/2017 – Obb Corners
 Have no tried, using the following methods to rotate the corners of my cubes so that they can be used for obb to obb collision;
 Matrix4x4.TRS()
 then using Matrix4x4.MultiplyVector()
 Quaternion rotaion using Sphereingcal linear interpolation
 Quaternion rotation creating a quaternion to represent the angle of rotation that occurs between each frame
 Creating a rotation matrix myself and applying that to the corners
 3×3 matrix for just rotation
 4×4 matrix for general 3d movements
 can be used for
 translation
 rotation
 scaling
 shearing
 projection
 can be used for
 Matrix4x4.TRS()
09/08/2017 – OBB Corner Setup
 Reworked the Update collisoin function to update the corners with rotational velocity instead of orientation
 However added an additional loop after the UpdateCollisionVolume function call to update the corners for each box with the orientation
08/08/2017 – OBB corners and OBBvsOBB collisions
 Swapped the implementation fo the OBB RotateCorners function to take in the orientation of the object instead of the rotational velocity
 Appears to have fixed the problem of the corners not being in the correct position but being visualised in the correct place
 May require further work
 Created a new environment to test the OBB OBB collision in isolation
 The first cross product axis to test is returning (0,0,0)
 This means the penetration is 0
 Upon further testing the marked axes are problem ones when the boxes have no rotations
 When the boxes have rotaions the tested axes with progressively smaller penetrations (White lines) and final minimum penentration axis (Red line) are correct
 Added an if statement that blocks the collision detection along an axis that had a magnitude of 0, this means a vector of (0,0,0)
 Additionally by multiplying the axis penetration by 1 we dont end up with the maximum axis of penetration as 8 is less than 1. This was causing an error ir the minimum axis.
 This menat that when teh collision resolution happened the two objects moved closer together.
 To combat this when the penetration is being set we mutiply again by 1
 This menat that when teh collision resolution happened the two objects moved closer together.
 Additionally by multiplying the axis penetration by 1 we dont end up with the maximum axis of penetration as 8 is less than 1. This was causing an error ir the minimum axis.
 The first cross product axis to test is returning (0,0,0)
07/08/2017 – OBB vs OBB Revisited
 Created a tolerance variable for the cube collision to compare floating point values
 In order to find the collision point
 Project each corner ono the collision normal
 then find the corners which are equal or very close to equal to the minimum and add them to a list of As collision points
 find the points that correspond to the maximum of b and add them to a list of collisionpoints for b
 depending on the number of points in each list will determine the type of collision
 1v1 – corner to corner
 1v2 – corner to edge
 1v4 – corner to face
 2v4 – edge to face
 4v4 – face to face
 Currently returns 6 points for one cube and shows that the corners are not rotated as the object is
 Added the function RotateCorners() to the OBB class
 Works as expected
 blue circles represent the corners of the obb
 Works as expected