hi gang,
This one's a techy one, a verrry techy one...
Consider a cube falling down, towards a landscape. The landscape was loaded as a Collada scene and is now fully rendered.
To avoid the cube falling through the landscape, collission needs to be detected. Several challenges:
- Thee js' own Raycaster, and letting that cast ONE ray down from the falling cube. make it stop falling (in the refresh loop) if the ray hits something (intersects witht the landscape) - snag: mr Doob (yep, that is his nick) and C° do not really bebieve in documentation...
- extracting the X/Y coords of the cube and figuring out how high the underlying triangle in the landscape (at the same X/Y coords) is and stopping the "fall" if these two are (almost) the same..., snag : how do I extract the right triangle...
Any light would be welcome...I'm just looking and shopping around...
Personally, I't go for the wegbl-only approach, but that means I'll end up with my own framework anyway, on the other hand, a stable one (not changing too much in a too short period) would be great...
Thanks
Thor