add physics to interactive objects
This commit is contained in:
@@ -20,6 +20,7 @@
|
||||
|
||||
<script>
|
||||
import { GameEngine } from '@/lib/GameEngine.js';
|
||||
import { autoScale } from '@/lib/MeshUtils';
|
||||
let gameEngine = null;
|
||||
|
||||
export default{
|
||||
@@ -75,7 +76,7 @@ export default{
|
||||
this.animations = gltf.animations.map(a => ({
|
||||
name: a.name, id: a.uuid
|
||||
}));
|
||||
gameEngine.autoScale(gltf.scene);
|
||||
autoScale(gltf.scene);
|
||||
let bb = new gameEngine.$.Box3().setFromObject(gltf.scene);
|
||||
gltf.scene.traverse(function (o) {
|
||||
o.frustumCulled = false;
|
||||
|
||||
Reference in New Issue
Block a user