Commit 09a3ccc1 authored by Chunchi Che's avatar Chunchi Che

setup hand interactivity but remain some work

parent 4eaa1491
...@@ -62,8 +62,9 @@ export const HandHoverOutScaling = () => { ...@@ -62,8 +62,9 @@ export const HandHoverOutScaling = () => {
return new BABYLON.Vector3(1, 1, 1); return new BABYLON.Vector3(1, 1, 1);
}; };
export const HandInteractShape = () => { export const HandInteractShape = () => {
return { width: 0.6, height: 0.3 }; return { width: 0.4, height: 0.1 };
}; };
export const HandInteractFontSize = 300;
// 怪兽区 // 怪兽区
export const MonsterColor = () => { export const MonsterColor = () => {
......
...@@ -73,12 +73,10 @@ function setupHandInteractivity( ...@@ -73,12 +73,10 @@ function setupHandInteractivity(
`handInteractButtion${handIdx}`, `handInteractButtion${handIdx}`,
"test" "test"
); );
button.width = interactShape.width; button.fontSize = CONFIG.HandInteractFontSize;
button.height = interactShape.height;
button.fontSize = 200;
button.background = "gray"; button.background = "gray";
button.onPointerClickObservable.add(() => { button.onPointerClickObservable.add(() => {
alert(`<Interact>hand ${handIdx}`); console.log(`<Interact>hand ${handIdx}`);
}); });
advancedTexture.addControl(button); advancedTexture.addControl(button);
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment