mirror of
https://github.com/HifiExperiments/overte.git
synced 2025-08-10 12:47:44 +02:00
have right rotation on sequential edits
This commit is contained in:
parent
4afdd0242b
commit
b0da1773c2
1 changed files with 4 additions and 3 deletions
|
@ -60,7 +60,7 @@ var CUTOFF_MAX = 360;
|
||||||
var EXPONENT_MAX = 1;
|
var EXPONENT_MAX = 1;
|
||||||
|
|
||||||
var SLIDER_SCRIPT_URL = Script.resolvePath('slider.js?' + Math.random(0, 100));
|
var SLIDER_SCRIPT_URL = Script.resolvePath('slider.js?' + Math.random(0, 100));
|
||||||
var LIGHT_MODEL_URL = 'http://hifi-content.s3.amazonaws.com/james/light_modifier/source4_rotated.fbx';
|
var LIGHT_MODEL_URL = 'http://hifi-content.s3.amazonaws.com/james/light_modifier/source4_very_good.fbx';
|
||||||
var CLOSE_BUTTON_MODEL_URL = 'http://hifi-content.s3.amazonaws.com/james/light_modifier/red_x.fbx';
|
var CLOSE_BUTTON_MODEL_URL = 'http://hifi-content.s3.amazonaws.com/james/light_modifier/red_x.fbx';
|
||||||
var CLOSE_BUTTON_SCRIPT_URL = Script.resolvePath('closeButton.js?' + Math.random(0, 100));
|
var CLOSE_BUTTON_SCRIPT_URL = Script.resolvePath('closeButton.js?' + Math.random(0, 100));
|
||||||
|
|
||||||
|
@ -408,7 +408,7 @@ function makeSliders(light) {
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
function createLightModel(position) {
|
function createLightModel(position,rotation) {
|
||||||
var blockProperties = {
|
var blockProperties = {
|
||||||
name: 'Hifi-Spotlight-Model',
|
name: 'Hifi-Spotlight-Model',
|
||||||
type: 'Model',
|
type: 'Model',
|
||||||
|
@ -417,6 +417,7 @@ function createLightModel(position) {
|
||||||
dimensions: LIGHT_MODEL_DIMENSIONS,
|
dimensions: LIGHT_MODEL_DIMENSIONS,
|
||||||
collisionsWillMove: true,
|
collisionsWillMove: true,
|
||||||
position: position,
|
position: position,
|
||||||
|
rotation:rotation,
|
||||||
script: PARENT_SCRIPT_URL,
|
script: PARENT_SCRIPT_URL,
|
||||||
userData: JSON.stringify({
|
userData: JSON.stringify({
|
||||||
handControllerKey: {
|
handControllerKey: {
|
||||||
|
@ -552,7 +553,7 @@ function handleLightOverlayRayCheckMessages(channel, message, sender) {
|
||||||
|
|
||||||
currentLight = lightID;
|
currentLight = lightID;
|
||||||
var lightProperties = Entities.getEntityProperties(lightID);
|
var lightProperties = Entities.getEntityProperties(lightID);
|
||||||
block = createLightModel(lightProperties.position);
|
block = createLightModel(lightProperties.position,lightProperties.rotation);
|
||||||
|
|
||||||
var light = {
|
var light = {
|
||||||
id: lightID,
|
id: lightID,
|
||||||
|
|
Loading…
Reference in a new issue