Hello Folks,
Brain freeze at the moment ,
As i did not want to involve any physics engine overload,
made this simple AABB collision , it works and does not not work , what i meant was , when i ran the test it is giving me collision results , but not correct results, i have set a console.log and change colour on collision in the render function , which kind of works
next part is when i update the line position (end point unknown), got this method , do not know why this is not working either ,
"getting the end point from the start point , angle and the distance "
“and in the render how do i update the line position to the end point calculated from above”
and here is the bare bones code
here is the fiddle , https://jsfiddle.net/launchX/08y3j2pf/2/ , finally found out how to add a fiddle and make it work
when you click on the blank screen you get the lines moving from the mouse click,
thanks in advance