Open bllem opened 6 years ago
do you have a demo somewehere?
I have a video. By default, the CCD is turned on at a speed of 10+. In this video, the balls are not bullets, but only a display of hits. A bullet with a diameter of 0.1 and it is represented by a physical object with a start velocity about 360 https://youtu.be/5WsRRIVgk3I
Wow, impressive! All of this is done with ThreeJS and CannonJS?
Cool and just in time! Although I've encountered a problem. Take a look at those gifs: usual cannon.js — https://gfycat.com/ContentSleepyBedlingtonterrier cannon.js with CCD — https://gfycat.com/ContentShallowKingfisher
I control the ball by applying force (directed to the left or right).
With CCD, angularVelocity builds up too quickly, and then the ball gets thrown hard (look like in opposite direction of applied force, or maybe direction depends on angularVelocity, i don't know for sure). Without CCD it's stable, no unexpected speed ups.
I did not add a correction for angular acceleration and rotation, if it is necessary - I can add
that is a really cool looking demo!
@bllem It would be great to have full-blown CCD in cannon.js, so if you have the time... :)
I have used your new build of cannonjs but still not working , is that something need to set up?
in body options you can setup ccdSpeedThreshold - speed s at witch CCD starts to work and - ccdIterations collision accuracy.
Hello. Did a real shooting from the weapons in the shooter, and fought with the lack of ccd in cannon, but it is present in p1. Moves ccd into the cannon, and it works great. I removed the rotation, because I did for the bullets. Perhaps someone will need
https://github.com/bllem/cannon.js/commits/master