소스 검색

Basketball game: update ball

customisations
alemart 8 달 전
부모
커밋
ddda3e6e53
3개의 변경된 파일2개의 추가작업 그리고 1개의 파일을 삭제
  1. BIN
      demos/basketball/assets/ball.blend
  2. BIN
      demos/basketball/assets/ball.glb
  3. 2
    1
      demos/basketball/src/entities/ball.js

BIN
demos/basketball/assets/ball.blend 파일 보기


BIN
demos/basketball/assets/ball.glb 파일 보기


+ 2
- 1
demos/basketball/src/entities/ball.js 파일 보기

@@ -11,7 +11,7 @@ import { Entity } from './entity.js';
11 11
 import { GameEvent } from '../core/events.js';
12 12
 
13 13
 /** Radius of the ball */
14
-const BALL_RADIUS = 0.27;
14
+const BALL_RADIUS = 0.275;
15 15
 
16 16
 /** Minimum distance for scoring 3 points */
17 17
 const THREE_POINT_THRESHOLD = 6.0;
@@ -384,6 +384,7 @@ export class Ball extends Entity
384 384
 
385 385
         // create the root node
386 386
         const physicsRoot = BABYLON.MeshBuilder.CreateSphere('Ball', { diameter: 2 * r });
387
+        physicsRoot.isVisible = false;
387 388
         physicsRoot.addChild(mesh);
388 389
 
389 390
         physicsRoot.physicsImpostor = new BABYLON.PhysicsImpostor(physicsRoot, BABYLON.PhysicsImpostor.SphereImpostor, {

Loading…
취소
저장