I am currently making a projectile system where the user can throw out an object, then if the object collided with anything it bounces and flys back to them. The problem I am having is detecting collisions. I am unsure of how to determine wether a Bézier curve runs through an object, and if so at what point. I have heard about using raycasting to do this, however I have also heard it is performance intensive. I normally don’t work with raycasting/projectiles, which has only made me even more lost.
Does anyone know how I can go about this? Thank you in advance!
Are you suggesting to cast the ray off the object that is being thrown? I didn’t even think of that, but that would probably be optimal as it isn’t as performance intensive yet it still allows me to calculate bounces and collisions.
Yeah, It would look something like this. Where the black line is your bezier curve and the red is the raycast. So you would approximate the direction of the curve and then check if there is something infront.