skyrim is finished mostly

This commit is contained in:
Melbyj1125 2022-04-08 13:21:50 -05:00
parent 04a8caf8bb
commit b097ca6907
5 changed files with 195 additions and 19 deletions

View File

@ -715,6 +715,133 @@ MeshFilter:
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 360025847}
m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0}
--- !u!1 &369757238
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 369757239}
- component: {fileID: 369757242}
- component: {fileID: 369757241}
- component: {fileID: 369757240}
m_Layer: 0
m_Name: Cube
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!4 &369757239
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 369757238}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: -9, z: -0.51}
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children: []
m_Father: {fileID: 2018109525}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!65 &369757240
BoxCollider:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 369757238}
m_Material: {fileID: 0}
m_IsTrigger: 0
m_Enabled: 1
serializedVersion: 2
m_Size: {x: 1, y: 1, z: 1}
m_Center: {x: 0, y: 0, z: 0}
--- !u!23 &369757241
MeshRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 369757238}
m_Enabled: 1
m_CastShadows: 1
m_ReceiveShadows: 1
m_DynamicOccludee: 1
m_MotionVectors: 1
m_LightProbeUsage: 1
m_ReflectionProbeUsage: 1
m_RayTracingMode: 2
m_RayTraceProcedural: 0
m_RenderingLayerMask: 1
m_RendererPriority: 0
m_Materials:
- {fileID: 10303, guid: 0000000000000000f000000000000000, type: 0}
m_StaticBatchInfo:
firstSubMesh: 0
subMeshCount: 0
m_StaticBatchRoot: {fileID: 0}
m_ProbeAnchor: {fileID: 0}
m_LightProbeVolumeOverride: {fileID: 0}
m_ScaleInLightmap: 1
m_ReceiveGI: 1
m_PreserveUVs: 0
m_IgnoreNormalsForChartDetection: 0
m_ImportantGI: 0
m_StitchLightmapSeams: 1
m_SelectedEditorRenderState: 3
m_MinimumChartSize: 4
m_AutoUVMaxDistance: 0.5
m_AutoUVMaxAngle: 89
m_LightmapParameters: {fileID: 0}
m_SortingLayerID: 0
m_SortingLayer: 0
m_SortingOrder: 0
m_AdditionalVertexStreams: {fileID: 0}
--- !u!33 &369757242
MeshFilter:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 369757238}
m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0}
--- !u!1 &377042322
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 377042323}
m_Layer: 0
m_Name: Hooks
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!4 &377042323
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 377042322}
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
m_LocalPosition: {x: 36.3, y: 14.7, z: 13.7}
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children:
- {fileID: 1405946433}
- {fileID: 1709217282}
m_Father: {fileID: 0}
m_RootOrder: 6
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!1 &478416584
GameObject:
m_ObjectHideFlags: 0
@ -1074,7 +1201,7 @@ Transform:
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children: []
m_Father: {fileID: 0}
m_RootOrder: 7
m_RootOrder: 8
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!1 &650550299
GameObject:
@ -1973,7 +2100,7 @@ Transform:
m_LocalScale: {x: 5, y: 1, z: 5}
m_Children: []
m_Father: {fileID: 0}
m_RootOrder: 6
m_RootOrder: 7
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!136 &1181153603
CapsuleCollider:
@ -2040,7 +2167,7 @@ Transform:
- {fileID: 360025848}
- {fileID: 577483205}
m_Father: {fileID: 0}
m_RootOrder: 8
m_RootOrder: 9
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!1 &1257935739
GameObject:
@ -2321,12 +2448,12 @@ Transform:
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1405946429}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 36.3, y: 14.7, z: 13.7}
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children: []
m_Father: {fileID: 0}
m_RootOrder: 5
m_Father: {fileID: 377042323}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!54 &1405946434
Rigidbody:
@ -2415,7 +2542,7 @@ Transform:
- {fileID: 573469552}
- {fileID: 1608019103}
m_Father: {fileID: 0}
m_RootOrder: 9
m_RootOrder: 10
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!1 &1608019102
GameObject:
@ -2807,12 +2934,12 @@ Transform:
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1709217277}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 110.6, y: 24.5, z: 13.7}
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
m_LocalPosition: {x: 74.3, y: 9.8, z: 0}
m_LocalScale: {x: 10, y: 10, z: 10}
m_Children: []
m_Father: {fileID: 0}
m_RootOrder: 10
m_Father: {fileID: 377042323}
m_RootOrder: 1
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!1 &1781357367
GameObject:
@ -3130,6 +3257,37 @@ MeshFilter:
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 2007460318}
m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0}
--- !u!1 &2018109524
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 2018109525}
m_Layer: 0
m_Name: SlantPlatforms
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!4 &2018109525
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 2018109524}
m_LocalRotation: {x: 0.38268343, y: 0, z: 0, w: 0.92387956}
m_LocalPosition: {x: 31, y: 5, z: 16.4}
m_LocalScale: {x: 10, y: 1, z: 10}
m_Children:
- {fileID: 369757239}
m_Father: {fileID: 0}
m_RootOrder: 5
m_LocalEulerAnglesHint: {x: 45, y: 0, z: 0}
--- !u!1 &2059816015
GameObject:
m_ObjectHideFlags: 0

View File

@ -13,7 +13,7 @@ public class dAerialGrappleAirState : dAerialBaseState
bool pointReached = false;
float initialForcePower = 4;
float initialForcePower = 100;
public override void EnterState(dAerialStateManager aSM, dAerialBaseState previousState){
@ -22,7 +22,7 @@ public class dAerialGrappleAirState : dAerialBaseState
distanceBeneathHook = -3f;
distanceAfterHook = 8f;
pointReached = false;
initialForcePower = 4;
initialForcePower = 100;
//refresh jump number
aSM.curJumpNum = 0;
@ -83,7 +83,7 @@ public class dAerialGrappleAirState : dAerialBaseState
//Apply default gravity
if(!pointReached){
aSM.moveController.Move(initialForceDirection * initialForcePower);
aSM.moveController.Move(initialForceDirection * initialForcePower * Time.deltaTime);
aSM.GravityCalculation(0);
aSM.pStats.GravVel = 0;
}

View File

@ -58,6 +58,7 @@ public class dAerialStateManager : NetworkBehaviour
//Ground Check
public bool isGrounded; // is player grounded
public float groundCheckDistance = 0.05f; // offset distance to check ground
public float groundSlantDistance = 0.1f;
const float jumpGroundingPreventionTime = 0.2f; // delay so player doesn't get snapped to ground while jumping
const float groundCheckDistanceInAir = 0.07f; // How close we have to get to ground to start checking for grounded again
Ray groundRay; // ground ray
@ -244,6 +245,14 @@ public class dAerialStateManager : NetworkBehaviour
}
}
}
else if(Physics.Raycast(groundRay, out groundHit, moveController.height + groundSlantDistance) && !jumpPressed){
if(Vector3.Dot(groundHit.normal, transform.up) > 0f){
Debug.Log("On a Slant");
Debug.Log("The grounds Normal" + groundHit.normal);
moveController.Move(groundHit.normal * 20 * Time.deltaTime);
mSM.CancelMomentum();
}
}
}
//Actually applies the downwards movement
@ -514,7 +523,7 @@ public class dAerialStateManager : NetworkBehaviour
public void GrappleReleaseForce(){
if(release){
currentForcePower *= .90f;
moveController.Move(postForceDirection * currentForcePower);
moveController.Move(postForceDirection * currentForcePower * Time.deltaTime);
if(currentForcePower < .05) release = false;
}

View File

@ -62,6 +62,7 @@ public class AerialStateManager : NetworkBehaviour
//Ground Check
public bool isGrounded; // is player grounded
public float groundCheckDistance = 0.05f; // offset distance to check ground
public float groundSlantDistance = 0.1f;
const float jumpGroundingPreventionTime = 0.2f; // delay so player doesn't get snapped to ground while jumping
const float groundCheckDistanceInAir = 0.07f; // How close we have to get to ground to start checking for grounded again
Ray groundRay; // ground ray
@ -271,6 +272,14 @@ public class AerialStateManager : NetworkBehaviour
}
}
}
else if(Physics.Raycast(groundRay, out groundHit, moveController.height + groundSlantDistance) && !jumpPressed){
if(Vector3.Dot(groundHit.normal, transform.up) > 0f){
Debug.Log("On a Slant");
Debug.Log("The grounds Normal" + groundHit.normal);
moveController.Move(groundHit.normal * 20 * Time.deltaTime);
mSM.CancelMomentum();
}
}
}
//Actually applies the downwards movement

View File

@ -13,7 +13,7 @@ public class AerialGrappleAirState : AerialBaseState
bool pointReached = false;
float initialForcePower = 4;
float initialForcePower = 100;
public override void EnterState(AerialStateManager aSM, AerialBaseState previousState){
@ -22,7 +22,7 @@ public class AerialGrappleAirState : AerialBaseState
distanceBeneathHook = -3f;
distanceAfterHook = 8f;
pointReached = false;
initialForcePower = 4;
initialForcePower = 100;
//refresh jump number
aSM.curJumpNum = 0;
@ -83,7 +83,7 @@ public class AerialGrappleAirState : AerialBaseState
//Apply default gravity
if(!pointReached){
aSM.moveController.Move(initialForceDirection * initialForcePower);
aSM.moveController.Move(initialForceDirection * initialForcePower * Time.deltaTime);
aSM.GravityCalculation(0);
aSM.pStats.GravVel = 0;
}