Commit 6ef1cd8c authored by Chunchi Che's avatar Chunchi Che

fix op monsters rotation

parent 0b322a0a
......@@ -26,8 +26,10 @@ export const ExclusionSlotShape = () => {
export const FieldSlotShape = () => {
return { width: 0.8, height: 1, depth: 0.2 };
};
export const CardSlotRotation = () => {
return new BABYLON.Vector3(1.55, 0, 0);
export const CardSlotRotation = (reverse: boolean) => {
return reverse
? new BABYLON.Vector3(1.55, 3.1, 0)
: new BABYLON.Vector3(1.55, 0, 0);
};
export const CardSlotDefenceRotation = () => {
return new BABYLON.Vector3(1.55, 1.55, 0);
......
......@@ -39,7 +39,7 @@ const Monsters = () => {
state={monster}
key={idx}
position={position}
rotation={CONFIG.CardSlotRotation()}
rotation={CONFIG.CardSlotRotation(false)}
deffenseRotation={CONFIG.CardSlotDefenceRotation()}
/>
);
......@@ -50,7 +50,7 @@ const Monsters = () => {
state={monster}
key={idx}
position={position}
rotation={CONFIG.CardSlotRotation()}
rotation={CONFIG.CardSlotRotation(true)}
deffenseRotation={CONFIG.CardSlotDefenceRotation()}
/>
);
......@@ -147,7 +147,7 @@ const ExtraMonsters = () => {
const shape = CONFIG.CardSlotShape();
const position = (x: number) =>
new BABYLON.Vector3(x, shape.depth / 2 + CONFIG.Floating, 0);
const rotation = CONFIG.CardSlotRotation();
const rotation = CONFIG.CardSlotRotation(false);
return (
<>
......
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