Fix battle model offsets

This commit is contained in:
JappaWakka 2025-01-18 13:33:38 +01:00
parent 4621ecbb12
commit 7214556dda
2 changed files with 12 additions and 12 deletions

View File

@ -93,11 +93,6 @@
Private Sub Move()
Dim DestinationOffset As Vector3 = New Vector3(0)
If TargetEntity.Model IsNot Nothing Then
DestinationOffset = New Vector3(0, -0.5, 0)
End If
Select Case MovementCurve
Case Curves.EaseIn
If EasedIn = False Then
@ -195,17 +190,17 @@
End If
If MoveDistance.Y > 0.05F Then
If StartPosition.Y < Me.Destination.Y + DestinationOffset.Y Then
If StartPosition.Y < Me.Destination.Y Then
TargetEntity.Position.Y += Me.MoveYSpeed
If TargetEntity.Position.Y >= Me.Destination.Y + DestinationOffset.Y - 0.05 Then
TargetEntity.Position.Y = Me.Destination.Y + DestinationOffset.Y
If TargetEntity.Position.Y >= Me.Destination.Y - 0.05 Then
TargetEntity.Position.Y = Me.Destination.Y
End If
ElseIf StartPosition.Y > Me.Destination.Y + DestinationOffset.Y Then
ElseIf StartPosition.Y > Me.Destination.Y Then
TargetEntity.Position.Y -= Me.MoveYSpeed
If TargetEntity.Position.Y <= Me.Destination.Y + DestinationOffset.Y + 0.05 Then
TargetEntity.Position.Y = Me.Destination.Y + DestinationOffset.Y
If TargetEntity.Position.Y <= Me.Destination.Y + 0.05 Then
TargetEntity.Position.Y = Me.Destination.Y
End If
End If
MoveDistance.Y -= Me.MoveYSpeed

View File

@ -109,12 +109,18 @@ Namespace BattleSystem
Position.X *= -1
End If
NewPosition = CurrentEntity.Position + Position
If CurrentEntity.Model IsNot Nothing Then
NewPosition.Y += 0.5F
End If
Else
NewPosition = Position
End If
Else
If CurrentEntity IsNot Nothing Then
NewPosition = CurrentEntity.Position
If CurrentEntity.Model IsNot Nothing Then
NewPosition.Y += 0.5F
End If
Else
NewPosition = New Vector3(0, 0, 0)
End If
@ -184,7 +190,6 @@ Namespace BattleSystem
Destination = CurrentEntity.Position + New Vector3(DestinationX, DestinationY, DestinationZ)
End If
Dim baEntityMove As BAEntityMove = New BAEntityMove(MoveEntity, RemoveEntityAfter, Destination, Speed, SpinX, SpinZ, startDelay, endDelay, SpinXSpeed, SpinZSpeed, MovementCurve, MoveYSpeed)
AnimationSequence.Add(baEntityMove)