sline points

Replaced hardcoded spline points with first two raycast intersection points on click.

Computed the middle control point using the incenter of a triangle formed with the midpoint as the third vertex, creating a dynamic Bézier curve.
This commit is contained in:
2025-08-01 15:57:11 +05:30
parent 1eac23607f
commit 3394c44ed1
9 changed files with 592 additions and 208 deletions

View File

@@ -1,5 +1,6 @@
import MaterialSpawner from './materialSpawner'
import ColliderCreator from './colliders/colliderCreator'
import { SplineCreator } from './conveyor/splineCreator'
function PhysicsSimulator() {
return (
@@ -15,14 +16,15 @@ function PhysicsSimulator() {
spawnInterval={1000}
spawnCount={5}
/>
<MaterialSpawner
{/* <MaterialSpawner
position={[6, 3, -6]}
spawnInterval={1000}
spawnCount={5}
/>
/> */}
<ColliderCreator />
{/* <SplineCreator /> */}
</>
)
}