adding collision hulls to can and bowl

This commit is contained in:
ericrius1 2016-03-30 15:38:21 -07:00
parent 286bc5de1d
commit 182e05e125

View file

@ -21,6 +21,7 @@ Plant = function(spawnPosition, spawnRotation) {
print("EBL ORIENTATION " + JSON.stringify(orientation)); print("EBL ORIENTATION " + JSON.stringify(orientation));
var bowlPosition = spawnPosition; var bowlPosition = spawnPosition;
var BOWL_MODEL_URL = "atp:/growingPlant/Flowers-Bowl.fbx"; var BOWL_MODEL_URL = "atp:/growingPlant/Flowers-Bowl.fbx";
var BOWL_COLLISION_HULL_URL = "atp:/growingPlant/bowl.obj";
var bowlDimensions = { var bowlDimensions = {
x: 0.518, x: 0.518,
y: 0.1938, y: 0.1938,
@ -30,6 +31,8 @@ Plant = function(spawnPosition, spawnRotation) {
type: "Model", type: "Model",
modelURL: BOWL_MODEL_URL, modelURL: BOWL_MODEL_URL,
dimensions: bowlDimensions, dimensions: bowlDimensions,
shapeType: 'compound',
compundShapeURL: BOWL_COLLISION_HULL_URL,
name: "plant bowl", name: "plant bowl",
position: bowlPosition, position: bowlPosition,
userData: JSON.stringify({ userData: JSON.stringify({
@ -69,12 +72,13 @@ Plant = function(spawnPosition, spawnRotation) {
var WATER_CAN_MODEL_URL = "atp:/growingPlant/waterCan.fbx"; var WATER_CAN_MODEL_URL = "atp:/growingPlant/waterCan.fbx";
var WATER_CAN_COLLIISION_HULL_URL = "atp:/growingPlant/can.obj";
var waterCanPosition = Vec3.sum(plantPosition, Vec3.multiply(0.6, Quat.getRight(orientation))); var waterCanPosition = Vec3.sum(plantPosition, Vec3.multiply(0.6, Quat.getRight(orientation)));
var waterCanRotation = orientation; var waterCanRotation = orientation;
var waterCan = Entities.addEntity({ var waterCan = Entities.addEntity({
type: "Model", type: "Model",
shapeType: 'box', shapeType: 'compound',
compundShapeURL: WATER_CAN_COLLIISION_HULL_URL,
name: "hifi-water-can", name: "hifi-water-can",
modelURL: WATER_CAN_MODEL_URL, modelURL: WATER_CAN_MODEL_URL,
script: WATER_CAN_SCRIPT_URL, script: WATER_CAN_SCRIPT_URL,