This is the versions of aframe and physics libraries I'm using:
"@belivvr/aframe-react": "^0.4.2",
"aframe": "^1.4.1",
"aframe-extras": "^6.1.1",
"aframe-physics-extras": "^0.1.3",
"aframe-physics-system": "^4.0.2"
I am using aframe-react and the collision between the camera and other objects is working fine but when I try to step on an Object the camera freezes and I'm getting the following error:
Uncaught TypeError: ray._updateDirection is not a function
at NewComponent.raycastToGround (kinematic-body.js:197:9)
at module.exports.AFRAME.registerComponent.step (kinematic-body.js:161:34)
at NewSystem.tick (system.js:154:25)
at AScene.tick (aframe-master.js:27725:36)
at AScene.render (aframe-master.js:27768:12)
at bound (aframe-master.js:32718:17)
at onAnimationFrame (aframe-master.js:37704:95)
at onAnimationFrame (aframe-master.js:36968:545)
The following is my code:
// @ts-nocheck
import "aframe";
import { Entity, Scene, Sky, Plane } from "@belivvr/aframe-react";
import "aframe-physics-system";
import "aframe-physics-extras";
import "aframe-extras";
const App = () => {
return (
<Scene physics="debug: true">
<Entity
geometry={{ primitive: "box" }}
material={{ color: "blue" }}
position={{ x: 0, y: 0.5, z: -3 }}
static-body="shape: auto"
/>
<Plane
geometry={{ primitive: "box", height: 0.01, width: 100, depth: 100 }}
material={{ color: "#275942" }}
position={{ x: 0, y: 0, z: 0 }}
static-body="shape: auto"
/>
<Plane
geometry={{ primitive: "box", height: 100, width: 100, depth: 1 }}
position={{ x: 0, y: 0, z: -6 }}
rotation={{ x: 0, y: 0, z: 0 }}
color="#890d72"
static-body="shape: auto"
/>
<Entity
id="rig"
look-controls="pointerLockEnabled: false;"
wasd-controls="acceleration: 100"
kinematic-body="shape: auto"
>
<Entity
camera="userHeight: 1.6"
position={{ x: 0, y: 1.6, z: 0 }}
></Entity>
</Entity>
<Sky color="#838383" />
</Scene>
);
};
export default App;