Hi Deltakosh

It looks like the problem has solved. But there are too many errors while I am migrating.

I’ve got another errors regarding Physics engine.

- Argument of type ‘Mesh’ is not assignable to parameter of type ‘IPhysicsEnabledObject’

With this code:

this.meshBase.physicsImpostor = new bjs.PhysicsImpostor(this.meshBase, bjs.PhysicsImpostor.SphereImpostor, { mass: 1, restitution: 0.5 }, this.scene.bjsScene);

Here, this.meshBase is a variable of BABYLON.Mesh type

- No overload matches this call.

Overload 1 of 2, ‘(gravity: Vector3, plugin?: IPhysicsEnginePlugin): boolean’, gave the following error.

Argument of type ‘import(“babylonjs/Maths/math.vector”).Vector3’ is not assignable to parameter of type ‘import(“babylonjs/Maths/math”).Vector3’.

The types of ‘toQuaternion().equals’ are incompatible between these types.

Type ‘(otherQuaternion: import(“babylonjs/types”).DeepImmutableObject<import(“babylonjs/Maths/math.vector”).Quaternion>) => boolean’ is not assignable to type ‘(otherQuaternion: import(“babylonjs/types”).DeepImmutableObject<import(“babylonjs/Maths/math”).Quaternion>) => boolean’.

Types of parameters ‘otherQuaternion’ and ‘otherQuaternion’ are incompatible.

Property ‘equalsWithEpsilon’ is missing in type ‘import(“babylonjs/types”).DeepImmutableObject<import(“babylonjs/Maths/math”).Quaternion>’ but required in type ‘import(“babylonjs/types”).DeepImmutableObject<import(“babylonjs/Maths/math.vector”).Quaternion>’.

Overload 2 of 2, ‘(gravity: Vector3, plugin?: IPhysicsEnginePlugin): boolean’, gave the following error.

Argument of type ‘CannonJSPlugin’ is not assignable to parameter of type ‘IPhysicsEnginePlugin’.

Types of property ‘setGravity’ are incompatible.

Type ‘(gravity: Vector3) => void’ is not assignable to type ‘{ (gravity: Vector3): void; (gravity: Vector3): void; }’.

Types of parameters ‘gravity’ and ‘gravity’ are incompatible.

Type ‘Vector3’ is missing the following properties from type ‘Vector3’: negateInPlace, negateToRef, crossts(2769)

babylon.module.d.ts(3558, 9): ‘equalsWithEpsilon’ is declared here.

With code:

this.bjsScene.enablePhysics(this.bjsScene.gravity, new bjs.CannonJSPlugin(true, undefined, CANNON));

Here this.bjsScene is a variable of BABYLON.Scene type.

Is there any document I can refer for migration?

Please help me to solve this problems as well.

Thank you