Added collisions with objects on scene
Player will now be stopped by fences Also added the possibility to define the size of ground Also edited speed of animations Also optimized the loading of fences
This commit is contained in:
@@ -1,8 +1,8 @@
|
||||
//ground
|
||||
import * as THREE from 'three';
|
||||
|
||||
export function createGround() {
|
||||
const geometry = new THREE.PlaneGeometry(10, 10);
|
||||
export function createGround(height, width) {
|
||||
const geometry = new THREE.PlaneGeometry(height, width);
|
||||
const material = new THREE.MeshBasicMaterial({ color: 0xa3c973 });
|
||||
const plane = new THREE.Mesh(geometry, material);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user