Fixed wall bugs

dev-hazim
Hazim Bin Ijaz 1 week ago
parent da33b64a6b
commit 1dd1430423

@ -15,6 +15,7 @@ GameObject:
- component: {fileID: 8921202503349013827} - component: {fileID: 8921202503349013827}
- component: {fileID: 5807442085122568602} - component: {fileID: 5807442085122568602}
- component: {fileID: -7009867759405921325} - component: {fileID: -7009867759405921325}
- component: {fileID: 8127827489355646816}
m_Layer: 0 m_Layer: 0
m_Name: VectorFencePrefab m_Name: VectorFencePrefab
m_TagString: Untagged m_TagString: Untagged
@ -158,3 +159,34 @@ MonoBehaviour:
m_Name: m_Name:
m_EditorClassIdentifier: m_EditorClassIdentifier:
Ability: {fileID: 11400000, guid: 834f18926d3364d40ab9894f716b4e3b, type: 2} Ability: {fileID: 11400000, guid: 834f18926d3364d40ab9894f716b4e3b, type: 2}
--- !u!114 &8127827489355646816
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 9694722736535169}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: e96cb6065543e43c4a752faaa1468eb1, type: 3}
m_Name:
m_EditorClassIdentifier:
UseUnreliableDeltas: 0
SyncPositionX: 0
SyncPositionY: 0
SyncPositionZ: 0
SyncRotAngleX: 0
SyncRotAngleY: 0
SyncRotAngleZ: 0
SyncScaleX: 0
SyncScaleY: 1
SyncScaleZ: 0
PositionThreshold: 0.001
RotAngleThreshold: 0.01
ScaleThreshold: 0.01
UseQuaternionSynchronization: 0
UseQuaternionCompression: 0
UseHalfFloatPrecision: 0
InLocalSpace: 0
Interpolate: 1
SlerpPosition: 0

@ -157,8 +157,8 @@ public class AbilitySystem : NetworkBehaviour
Quaternion targetRotation = Quaternion.Euler(0f, angle, 0f); Quaternion targetRotation = Quaternion.Euler(0f, angle, 0f);
// Smooth rotation with Lerp // Smooth rotation with Lerp
wallIndicator.transform.rotation = targetRotation; // wallIndicator.transform.rotation = targetRotation;
// wallIndicator.transform.rotation = Quaternion.Lerp(wallIndicator.transform.rotation, targetRotation, Time.deltaTime * wallRotationSpeed); wallIndicator.transform.rotation = Quaternion.Lerp(wallIndicator.transform.rotation, targetRotation, Time.deltaTime * wallRotationSpeed);
isValidPlacement = IsPlacementValid(wallIndicator.transform.position, wallIndicator.transform.rotation, playerLayer); isValidPlacement = IsPlacementValid(wallIndicator.transform.position, wallIndicator.transform.rotation, playerLayer);
// Change indicator color based on placement validity // Change indicator color based on placement validity

Loading…
Cancel
Save