Open albertalgoritcom opened 3 months ago
<RigidBody ccd ref={rigidBodyRef} type="kinematicPosition" position={[position.x, position.y + 0.3, position.z]} enabledRotations={[false, true, false]} onCollisionEnter={handleCollisionEnter} onCollisionExit={handleCollisionExit} name="Player"
<CapsuleCollider args={[height / 2 - 0.3, 0.3]} restitution={0.2} friction={0.5} activeCollisionTypes={ActiveCollisionTypes.ALL} collisionGroups={interactionGroups(0, [0, 1])} /> <group visible position={[0, -height / 2, 0]}>
<RigidBody ccd ref={rigidBodyRef} type="kinematicPosition" position={[position.x, position.y + 0.3, position.z]} enabledRotations={[false, true, false]} onCollisionEnter={handleCollisionEnter} onCollisionExit={handleCollisionExit} name="Player"