Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
M
MDPro3
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Issues
6
Issues
6
List
Boards
Labels
Service Desk
Milestones
Merge Requests
4
Merge Requests
4
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Packages
Packages
List
Container Registry
Analytics
Analytics
CI / CD
Code Review
Insights
Issues
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
赤子奈落
MDPro3
Commits
d94a1ad4
Commit
d94a1ad4
authored
Mar 10, 2026
by
ElderLich
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Bug Fix: Fixed 21:9 Resolution and more
parent
87790664
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
55 additions
and
15 deletions
+55
-15
Assets/Scripts/MDPro3/Duel/GameCard.cs
Assets/Scripts/MDPro3/Duel/GameCard.cs
+33
-5
Assets/Scripts/MDPro3/Managers/CameraManager.cs
Assets/Scripts/MDPro3/Managers/CameraManager.cs
+22
-10
No files found.
Assets/Scripts/MDPro3/Duel/GameCard.cs
View file @
d94a1ad4
...
@@ -523,15 +523,14 @@ namespace MDPro3
...
@@ -523,15 +523,14 @@ namespace MDPro3
handsCount
=
Program
.
instance
.
ocgcore
.
GetOpHandCount
();
handsCount
=
Program
.
instance
.
ocgcore
.
GetOpHandCount
();
float
x
=
p
.
sequence
*
4
-
(
handsCount
-
1
)
*
2
;
float
x
=
p
.
sequence
*
4
-
(
handsCount
-
1
)
*
2
;
if
(
p
.
controller
==
0
)
if
(
p
.
controller
==
0
)
{
{
var
z
=
-
28
+
(
30
-
Program
.
instance
.
camera_
.
cameraMain
.
fieldOfView
)
*
0.7f
;
var
z
=
GetMyHandBaseZ
()
;
return
new
Vector3
(
x
+
handOffset
*
UIManager
.
ScreenLengthWithoutScalerX
(
0.038f
),
15
,
z
);
return
new
Vector3
(
x
+
handOffset
*
UIManager
.
ScreenLengthWithoutScalerX
(
0.038f
),
15
,
z
);
}
}
else
else
{
{
var
z
=
17
-
(
30
-
Program
.
instance
.
camera_
.
cameraMain
.
fieldOfView
)
*
0.7f
;
var
z
=
GetOpHandBaseZ
()
;
return
new
Vector3
(-
x
,
15
,
z
);
return
new
Vector3
(-
x
,
15
,
z
);
}
}
}
}
...
@@ -713,6 +712,35 @@ namespace MDPro3
...
@@ -713,6 +712,35 @@ namespace MDPro3
return
returnValue
;
return
returnValue
;
}
}
private
static
float
GetMyHandBaseZ
()
{
return
-
28f
+
GetHandDepthOffsetByFov
();
}
private
static
float
GetOpHandBaseZ
()
{
return
17f
-
GetHandDepthOffsetByFov
();
}
private
static
float
GetHandDepthOffsetByFov
()
{
var
camera
=
Program
.
instance
?.
camera_
?.
cameraMain
;
if
(
camera
==
null
)
return
0f
;
var
fovDelta
=
Mathf
.
Clamp
(
30f
-
camera
.
fieldOfView
,
0f
,
6f
);
var
fovCompensation
=
fovDelta
*
0.7f
;
// After widening duel camera framing, retract hand outward on ultrawide displays.
var
aspect
=
Tools
.
GetScreenAspectRatio
();
var
ultraWide21x9T
=
Mathf
.
InverseLerp
(
16f
/
9f
,
21f
/
9f
,
aspect
);
var
ultraWide32x9T
=
Mathf
.
InverseLerp
(
21f
/
9f
,
32f
/
9f
,
aspect
);
// Strong ultrawide push so hand cards sit lower while keeping a little more text visible.
var
ultraWideOutward
=
Mathf
.
Lerp
(
0f
,
1.60f
,
ultraWide21x9T
)
+
Mathf
.
Lerp
(
0f
,
1.10f
,
ultraWide32x9T
);
return
fovCompensation
-
ultraWideOutward
;
}
public
static
Vector3
GetCardRotation
(
GPS
p
,
int
code
=
0
)
public
static
Vector3
GetCardRotation
(
GPS
p
,
int
code
=
0
)
{
{
var
condition
=
CardRuleCondition
.
MeUpAtk
;
var
condition
=
CardRuleCondition
.
MeUpAtk
;
...
@@ -1915,9 +1943,9 @@ namespace MDPro3
...
@@ -1915,9 +1943,9 @@ namespace MDPro3
var
targetPosition
=
GetCardPosition
(
p
,
this
);
var
targetPosition
=
GetCardPosition
(
p
,
this
);
var
x
=
targetPosition
.
x
;
var
x
=
targetPosition
.
x
;
if
(
HideMyHandCard
&&
p
.
InMyControl
())
if
(
HideMyHandCard
&&
p
.
InMyControl
())
targetPosition
.
z
=
-
28f
;
targetPosition
.
z
=
GetMyHandBaseZ
()
;
if
(
HideOpHandCard
&&
!
p
.
InMyControl
())
if
(
HideOpHandCard
&&
!
p
.
InMyControl
())
targetPosition
.
z
=
17f
;
targetPosition
.
z
=
GetOpHandBaseZ
()
;
model
.
transform
.
DOLocalMove
(
targetPosition
,
time
);
model
.
transform
.
DOLocalMove
(
targetPosition
,
time
);
}
}
...
...
Assets/Scripts/MDPro3/Managers/CameraManager.cs
View file @
d94a1ad4
...
@@ -56,16 +56,28 @@ namespace MDPro3
...
@@ -56,16 +56,28 @@ namespace MDPro3
public
static
void
ChangeCameraFOV
()
public
static
void
ChangeCameraFOV
()
{
{
float
aspect
=
(
float
)
Screen
.
width
*
9
/
Screen
.
height
;
var
camera
=
Program
.
instance
.
camera_
;
if
(
aspect
>
16
)
if
(
camera
==
null
||
camera
.
cameraMain
==
null
||
camera
.
cameraDuelOverlay3D
==
null
)
{
return
;
Program
.
instance
.
camera_
.
cameraMain
.
fieldOfView
=
30
+
16
-
aspect
;
Program
.
instance
.
camera_
.
cameraDuelOverlay3D
.
fieldOfView
=
Program
.
instance
.
camera_
.
cameraMain
.
fieldOfView
;
var
aspect
=
Tools
.
GetScreenAspectRatio
();
}
var
ultraWideT
=
Mathf
.
InverseLerp
(
16f
/
9f
,
32f
/
9f
,
aspect
);
else
// Keep 16:9 unchanged while widening ultrawide framing to match MD-style composition.
var
duelFov
=
Mathf
.
Lerp
(
30f
,
33f
,
ultraWideT
);
camera
.
cameraMain
.
fieldOfView
=
duelFov
;
camera
.
cameraDuelOverlay3D
.
fieldOfView
=
duelFov
;
mainCameraDefaultPosition
=
new
Vector3
(
0f
,
95f
+
Mathf
.
Lerp
(
0f
,
4f
,
ultraWideT
),
-
37f
-
Mathf
.
Lerp
(
0f
,
5f
,
ultraWideT
));
if
(
Program
.
instance
.
ocgcore
!=
null
&&
Program
.
instance
.
ocgcore
.
showing
)
{
{
Program
.
instance
.
camera_
.
cameraMain
.
fieldOfView
=
30
;
camera
.
cameraMain
.
transform
.
localPosition
=
mainCameraDefaultPosition
;
Program
.
instance
.
camera_
.
cameraDuelOverlay3D
.
fieldOfView
=
30
;
if
(!
overlaySticking
)
camera
.
cameraDuelOverlay3D
.
transform
.
localPosition
=
mainCameraDefaultPosition
;
}
}
}
}
...
@@ -89,7 +101,7 @@ namespace MDPro3
...
@@ -89,7 +101,7 @@ namespace MDPro3
public
static
void
Overlay3DReset
()
public
static
void
Overlay3DReset
()
{
{
Program
.
instance
.
camera_
.
cameraDuelOverlay3D
.
transform
.
localPosition
=
new
Vector3
(
0
,
95
,
-
37
)
;
Program
.
instance
.
camera_
.
cameraDuelOverlay3D
.
transform
.
localPosition
=
mainCameraDefaultPosition
;
Program
.
instance
.
camera_
.
cameraDuelOverlay3D
.
transform
.
localEulerAngles
=
new
Vector3
(
70
,
0
,
0
);
Program
.
instance
.
camera_
.
cameraDuelOverlay3D
.
transform
.
localEulerAngles
=
new
Vector3
(
70
,
0
,
0
);
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment