Can we expect vector-based collision masks at some point? Or a polygon object? There would be a ready polygon editor with the physics behavior .
exists already, its a custom collision mask
[quote:8bjkiais]To be honest I gave up on this angle fairly quickly after I realised there was no way it was going to be simple and there is obviously a better way. Didn't think to do it for per axis like that though, so thanks for that
I'd quite like an idea of how to find this elusive angle because I find it interesting, and I've not been able to come up with anything at all.
i did mention what ashley was saying, although i dint really word it correctly, the part when i said push the object back the way its came,what ashley said is what i meant i problly should of said it clearer though.
and ashley
[quote:8bjkiais]The way normals can be calculated is by moving objects in a circle. If a ball, say, has collided with the edge of an arbitrarily shaped sprite, you can move the ball out by a radius (16 pixels works OK) and then collision test in a circle (say, at 4 degree intervals). By working out the average angle of the overlapping angles, you can calculate the approximate angle towards the surface, and inverting this gives you the normal.
ive tried something similar to this in a gear collision engine which i made (i checkerd for overlap every tick, and then once it caught one it would sping the gear using a loop and would stop spinning after it was not colliding or finished a 1 tooth increment movement), using fast loops and one problem arised, it has to be very precise to work properly, meaning it needs to check every pixel step, and it lags the system having to do all of these checks, also if something gets too far lodged into another object it would run a continuous loop