BabylonJS-CharacterController
BabylonJS-CharacterController copied to clipboard
support babylon v5
When will there be a Babylon.js 5.0 support?
This should work with 5.0. Let me know if you run into any issues.
I get error
ERROR in ./node_modules/babylonjs-charactercontroller/dist/CharacterController.js Module not found: Error: Can't resolve 'babylonjs' in 'D:\Harryk\my_project\study_babylon\node_modules\babylonjs-charactercontroller\dist' @ ./node_modules/babylonjs-charactercontroller/dist/CharacterController.js 1:85-105 @ ./src/index.ts @ multi babel-polyfill ./src/index.ts
but maybe because I connect Babylon in this way (it`s my index.ts)
import '@babylonjs/core/Debug/debugLayer'; import '@babylonjs/inspector'; import '@babylonjs/loaders/glTF'; import { Engine, Scene, Mesh, MeshBuilder, StandardMaterial, } from '@babylonjs/core'; import { CharacterController } from 'babylonjs-charactercontroller';
Yes you are right. This is the same issue as the one reported here https://github.com/ssatguru/BabylonJS-CharacterController/issues/39
Currently CharacterController is using
import .. from babylonjs ;
instead of
import ... from @babylonjs/....;
It is not using ES6 module. I have added using ES6 module to my TODO list but no ETA for now.
I suggest you either
- switch to using babylonjs instead of
@babylonjs/..
or - just copy CharacterController to your project and update it to use
@babylonjs
It is just one file , so that should be easy
Posted an ES6 version in thread here: https://github.com/ssatguru/BabylonJS-CharacterController/issues/39