ssatguru / BabylonJS-CharacterController

A CharacterController for BabylonJS
Apache License 2.0
217 stars 46 forks source link

support babylon v5 #49

Open SapsayArtyom opened 2 years ago

SapsayArtyom commented 2 years ago

When will there be a Babylon.js 5.0 support?

ssatguru commented 2 years ago

This should work with 5.0. Let me know if you run into any issues.

SapsayArtyom commented 2 years ago

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';

ssatguru commented 2 years ago

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

bigrig2212 commented 1 year ago

Posted an ES6 version in thread here: https://github.com/ssatguru/BabylonJS-CharacterController/issues/39