Closed enriqueto closed 9 years ago
Probably in the future! Needs some work: capsule casting (maybe it can work with ordinary ray casting too) and binary searching for time of impact.
let me know if I can help, unfortunately I am not familiar with physics engines
Well, if you decide to get familiar with p2, you could start porting the Cannon.js raycast methods and classes:
CANNON.World.prototype.raycastAll
CANNON.World.prototype.raycastAny
CANNON.World.prototype.raycastClosest
CANNON.RaycastResult
CANNON.Ray
I think that regular rays are a good start. If not, it's still a great feature :)
Alright. Although I'm quite busy I'll take a look to those classes
@enriqueto The classes and World methods are in place along with an example.
To do now is
Will continue working on this whenever I get some coding time over. I really want this feature for p2.js and cannon.js too :)
thanks, let see if I can understand that
@enriqueto lol don't worry I got this :P
I got 1 and 3 in place now, and instead of 2 I just use the raycast hit point. Now I just need to implement binary searching for the time of impact to make it more accurate.
You should be able to use this feature now by building p2.js locally and setting ccdThreshold to 0 on the body. See the ccd demo. It won't be very accurate, but it will work better than nothing :)
Added binary searching too! Should be working good now :)
Thanks, I felt a bit overwhelmed by that since I haven't got any experience programming game frameworks, just using them. Will try that next time I update FootChinko.
any plans for that?