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:
@@ -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 /> */}
|
||||
</>
|
||||
)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user