Hi, I’m Nonso. I’m new to BabylonJS. I’ve been using it for a few weeks now, and I have to say it’s a really amazing engine for webgl stuff, so I decided to use for gamedev. I’m making a weird racing game with an infinite track. I first tried using Path3D dynamically, it didn’t give me what I wanted because it uses a “starting normal” according to the documentation which doesnt look well for the kind of “wierd” racing game I have in mind, as a workaround I generated my own normals and track but I still use path.getTangentAt() for the tangents. I have two questions.
1.) Even though I have this workaround I’m still wondering if it’s possible to set or edit the path’s normals array manually and have it recalculate tangents and binormals. path.getNormals() returns a cloned array.
2.) when I create a new Path once then use path.update(points) in scene.registerBeforeRender or the render loop it throws an error unless I create a new path right before using it which defeats its purpose, I guess I’m doing something wrong. Can I use a curve object instead? but Curve3 doesn’t have the useful getPointAt() like Path3D, could you guide me on how to calculate this like how Path3D does? I already know how to calculate tangents and binormals needed.
If anyone knows what to do here please help. Thanks.