去掉obi,使用自写绳索
This commit is contained in:
@@ -1,8 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: db16dd818bde540c6a87fa0d2863c26a
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -1,8 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: dbcc2a84318854b0096382cb83b32e9f
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -1,8 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 00e8d42e857fb4adcb53914d0948b16c
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
Binary file not shown.
@@ -1,8 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 8e33f749f1d024f159aa5cae7a502d72
|
||||
NativeFormatImporter:
|
||||
externalObjects: {}
|
||||
mainObjectFileID: 7400000
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
Binary file not shown.
@@ -1,8 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 07415f30e4149416b920c1da07bdc3b7
|
||||
NativeFormatImporter:
|
||||
externalObjects: {}
|
||||
mainObjectFileID: 9100000
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
Binary file not shown.
File diff suppressed because it is too large
Load Diff
Binary file not shown.
File diff suppressed because it is too large
Load Diff
Binary file not shown.
File diff suppressed because it is too large
Load Diff
Binary file not shown.
File diff suppressed because it is too large
Load Diff
Binary file not shown.
File diff suppressed because it is too large
Load Diff
Binary file not shown.
File diff suppressed because it is too large
Load Diff
Binary file not shown.
File diff suppressed because it is too large
Load Diff
Binary file not shown.
File diff suppressed because it is too large
Load Diff
Binary file not shown.
File diff suppressed because it is too large
Load Diff
Binary file not shown.
File diff suppressed because it is too large
Load Diff
Binary file not shown.
File diff suppressed because it is too large
Load Diff
Binary file not shown.
File diff suppressed because it is too large
Load Diff
Binary file not shown.
@@ -1,12 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: e2cf68ff4b1ffda45a77f7307dd789b9
|
||||
labels:
|
||||
- ObiCloth
|
||||
- ObiRope
|
||||
- ObiSoftbody
|
||||
NativeFormatImporter:
|
||||
externalObjects: {}
|
||||
mainObjectFileID: -1
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -1,8 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: bb188f7223e6b4a96972d88b44925c5e
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
Binary file not shown.
@@ -1,9 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 0d242f91ab1d749a8b6230e6da662881
|
||||
timeCreated: 1501142792
|
||||
licenseType: Store
|
||||
NativeFormatImporter:
|
||||
mainObjectFileID: 13400000
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
Binary file not shown.
@@ -1,8 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 56297c6e785b44eb28e469b62cedc016
|
||||
timeCreated: 1453427102
|
||||
licenseType: Store
|
||||
NativeFormatImporter:
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
Binary file not shown.
@@ -1,8 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: f7532232f07594be3a36470e25b47b4f
|
||||
timeCreated: 1453427100
|
||||
licenseType: Store
|
||||
NativeFormatImporter:
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
Binary file not shown.
@@ -1,8 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 7e318fd02475245f48f8f968e5ef09d5
|
||||
timeCreated: 1445311398
|
||||
licenseType: Store
|
||||
NativeFormatImporter:
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
Binary file not shown.
@@ -1,8 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: b231b678223e044588ce32ebccbe77f3
|
||||
timeCreated: 1453427100
|
||||
licenseType: Store
|
||||
NativeFormatImporter:
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
Binary file not shown.
@@ -1,8 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: d368f2c47473d4bfb8dd9f08073cb403
|
||||
timeCreated: 1445322891
|
||||
licenseType: Store
|
||||
NativeFormatImporter:
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
Binary file not shown.
@@ -1,8 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: e17a5bb573d9748ac8e836ddee291602
|
||||
timeCreated: 1453427102
|
||||
licenseType: Store
|
||||
NativeFormatImporter:
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
Binary file not shown.
@@ -1,8 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: bb309543303c94a32b84f20d84389f76
|
||||
NativeFormatImporter:
|
||||
externalObjects: {}
|
||||
mainObjectFileID: 11400000
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
Binary file not shown.
@@ -1,8 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 06e7bfec7795f448eb8800edc99dbcf2
|
||||
timeCreated: 1453443046
|
||||
licenseType: Store
|
||||
NativeFormatImporter:
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -1,8 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 650750a778b8848c4ab561d23f15012e
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
Binary file not shown.
@@ -1,9 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 5eb5ff1af3a3f4a14977448198c232ae
|
||||
timeCreated: 1507047323
|
||||
licenseType: Store
|
||||
NativeFormatImporter:
|
||||
mainObjectFileID: 11400000
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -1,8 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: e71b9a406d7f848ceaaf698a595823f5
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
Binary file not shown.
@@ -1,8 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 359ef2e4b09204eeab112e419c308068
|
||||
timeCreated: 1435572264
|
||||
licenseType: Store
|
||||
NativeFormatImporter:
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
Binary file not shown.
@@ -1,8 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: e78e1b735e05b4dee88b279cb6997001
|
||||
timeCreated: 1435572264
|
||||
licenseType: Store
|
||||
NativeFormatImporter:
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
Binary file not shown.
@@ -1,8 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: d3b93997453834b97a4e8f3df52e1068
|
||||
NativeFormatImporter:
|
||||
externalObjects: {}
|
||||
mainObjectFileID: 2100000
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
Binary file not shown.
@@ -1,11 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 5c0346dbcbacd4648bec909deff79751
|
||||
labels:
|
||||
- ObiRope
|
||||
- ObiSoftbody
|
||||
NativeFormatImporter:
|
||||
externalObjects: {}
|
||||
mainObjectFileID: 2100000
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
Binary file not shown.
@@ -1,8 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 278487642d12d4bf78416679d50d6fd7
|
||||
timeCreated: 1466469210
|
||||
licenseType: Store
|
||||
NativeFormatImporter:
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -1,141 +0,0 @@
|
||||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!21 &2100000
|
||||
Material:
|
||||
serializedVersion: 8
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_Name: TestEnvironment
|
||||
m_Shader: {fileID: 4800000, guid: 933532a4fcc9baf4fa0491de14d08ed7, type: 3}
|
||||
m_Parent: {fileID: 0}
|
||||
m_ModifiedSerializedProperties: 0
|
||||
m_ValidKeywords:
|
||||
- _EMISSION
|
||||
- _SMOOTHNESS_TEXTURE_ALBEDO_CHANNEL_A
|
||||
m_InvalidKeywords: []
|
||||
m_LightmapFlags: 7
|
||||
m_EnableInstancingVariants: 0
|
||||
m_DoubleSidedGI: 0
|
||||
m_CustomRenderQueue: -1
|
||||
stringTagMap:
|
||||
RenderType: Opaque
|
||||
disabledShaderPasses:
|
||||
- MOTIONVECTORS
|
||||
m_LockedProperties:
|
||||
m_SavedProperties:
|
||||
serializedVersion: 3
|
||||
m_TexEnvs:
|
||||
- _BaseMap:
|
||||
m_Texture: {fileID: 2800000, guid: 8fbd9c5f957b8434883cdfce9d6a3c27, type: 3}
|
||||
m_Scale: {x: 11, y: 11}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _BumpMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _DetailAlbedoMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _DetailMask:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _DetailNormalMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _EmissionMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 11, y: 11}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _MainTex:
|
||||
m_Texture: {fileID: 2800000, guid: 8fbd9c5f957b8434883cdfce9d6a3c27, type: 3}
|
||||
m_Scale: {x: 11, y: 11}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _MetallicGlossMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _OcclusionMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _ParallaxMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _SpecGlossMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- unity_Lightmaps:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- unity_LightmapsInd:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- unity_ShadowMasks:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
m_Ints: []
|
||||
m_Floats:
|
||||
- _AddPrecomputedVelocity: 0
|
||||
- _AlphaClip: 0
|
||||
- _AlphaToMask: 0
|
||||
- _Blend: 0
|
||||
- _BlendModePreserveSpecular: 1
|
||||
- _BumpScale: 1
|
||||
- _ClearCoatMask: 0
|
||||
- _ClearCoatSmoothness: 0
|
||||
- _Cull: 2
|
||||
- _Cutoff: 0.5
|
||||
- _DetailAlbedoMapScale: 1
|
||||
- _DetailNormalMapScale: 1
|
||||
- _DstBlend: 0
|
||||
- _DstBlendAlpha: 0
|
||||
- _EnvironmentReflections: 1
|
||||
- _GlossMapScale: 0.5
|
||||
- _Glossiness: 0.5
|
||||
- _GlossyReflections: 1
|
||||
- _Metallic: 0
|
||||
- _Mode: 0
|
||||
- _OcclusionStrength: 1
|
||||
- _Parallax: 0.02
|
||||
- _QueueOffset: 0
|
||||
- _ReceiveShadows: 1
|
||||
- _Smoothness: 0.5
|
||||
- _SmoothnessTextureChannel: 1
|
||||
- _SpecularHighlights: 1
|
||||
- _SrcBlend: 1
|
||||
- _SrcBlendAlpha: 1
|
||||
- _Surface: 0
|
||||
- _UVSec: 0
|
||||
- _WorkflowMode: 1
|
||||
- _XRMotionVectorsPass: 1
|
||||
- _ZWrite: 1
|
||||
m_Colors:
|
||||
- _BaseColor: {r: 1, g: 1, b: 1, a: 1}
|
||||
- _Color: {r: 1, g: 1, b: 1, a: 1}
|
||||
- _EmissionColor: {r: 0, g: 0, b: 0, a: 1}
|
||||
- _SpecColor: {r: 0.2, g: 0.2, b: 0.2, a: 1}
|
||||
m_BuildTextureStacks: []
|
||||
m_AllowLocking: 1
|
||||
--- !u!114 &2635063883510072054
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 11
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 0}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: d0353a89b1f911e48b9e16bdc9f2e058, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
version: 10
|
||||
@@ -1,8 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: a0a5f9e13fa7c47f78547e54896609da
|
||||
timeCreated: 1483094905
|
||||
licenseType: Store
|
||||
NativeFormatImporter:
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
Binary file not shown.
@@ -1,12 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: f342c944c10cc4c9188a4f352c6a6eee
|
||||
labels:
|
||||
- ObiCloth
|
||||
- ObiRope
|
||||
- ObiSoftbody
|
||||
NativeFormatImporter:
|
||||
externalObjects: {}
|
||||
mainObjectFileID: -1
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
Binary file not shown.
@@ -1,8 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 22451ea3bd268401796b02a7b7573725
|
||||
timeCreated: 1440011158
|
||||
licenseType: Store
|
||||
NativeFormatImporter:
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -1,8 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 11970e9494e804ccfac6c6fb46ab223c
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
Binary file not shown.
@@ -1,80 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 2aa4d1401124f4f56bec911ef61b4766
|
||||
timeCreated: 1483097200
|
||||
licenseType: Store
|
||||
ModelImporter:
|
||||
serializedVersion: 19
|
||||
fileIDToRecycleName:
|
||||
100000: //RootNode
|
||||
400000: //RootNode
|
||||
2300000: //RootNode
|
||||
3300000: //RootNode
|
||||
4300000: pCube1
|
||||
materials:
|
||||
importMaterials: 0
|
||||
materialName: 0
|
||||
materialSearch: 1
|
||||
animations:
|
||||
legacyGenerateAnimations: 4
|
||||
bakeSimulation: 0
|
||||
resampleCurves: 1
|
||||
optimizeGameObjects: 0
|
||||
motionNodeName:
|
||||
animationImportErrors:
|
||||
animationImportWarnings:
|
||||
animationRetargetingWarnings:
|
||||
animationDoRetargetingWarnings: 0
|
||||
animationCompression: 1
|
||||
animationRotationError: 0.5
|
||||
animationPositionError: 0.5
|
||||
animationScaleError: 0.5
|
||||
animationWrapMode: 0
|
||||
extraExposedTransformPaths: []
|
||||
clipAnimations: []
|
||||
isReadable: 1
|
||||
meshes:
|
||||
lODScreenPercentages: []
|
||||
globalScale: 50
|
||||
meshCompression: 0
|
||||
addColliders: 0
|
||||
importBlendShapes: 1
|
||||
swapUVChannels: 0
|
||||
generateSecondaryUV: 0
|
||||
useFileUnits: 1
|
||||
optimizeMeshForGPU: 1
|
||||
keepQuads: 0
|
||||
weldVertices: 1
|
||||
secondaryUVAngleDistortion: 8
|
||||
secondaryUVAreaDistortion: 15.000001
|
||||
secondaryUVHardAngle: 88
|
||||
secondaryUVPackMargin: 4
|
||||
useFileScale: 1
|
||||
tangentSpace:
|
||||
normalSmoothAngle: 60
|
||||
normalImportMode: 0
|
||||
tangentImportMode: 3
|
||||
importAnimation: 1
|
||||
copyAvatar: 0
|
||||
humanDescription:
|
||||
serializedVersion: 2
|
||||
human: []
|
||||
skeleton: []
|
||||
armTwist: 0.5
|
||||
foreArmTwist: 0.5
|
||||
upperLegTwist: 0.5
|
||||
legTwist: 0.5
|
||||
armStretch: 0.05
|
||||
legStretch: 0.05
|
||||
feetSpacing: 0
|
||||
rootMotionBoneName:
|
||||
rootMotionBoneRotation: {x: 0, y: 0, z: 0, w: 1}
|
||||
hasTranslationDoF: 0
|
||||
hasExtraRoot: 0
|
||||
skeletonHasParents: 1
|
||||
lastHumanDescriptionAvatarSource: {instanceID: 0}
|
||||
animationType: 0
|
||||
humanoidOversampling: 1
|
||||
additionalBone: 0
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
Binary file not shown.
@@ -1,171 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 89e24673c05344d179c516868eb341b8
|
||||
ModelImporter:
|
||||
serializedVersion: 21202
|
||||
internalIDToNameTable:
|
||||
- first:
|
||||
1: 100000
|
||||
second: //RootNode
|
||||
- first:
|
||||
1: 100002
|
||||
second: pCube2
|
||||
- first:
|
||||
1: 100004
|
||||
second: pCube3
|
||||
- first:
|
||||
1: 100006
|
||||
second: pCube4
|
||||
- first:
|
||||
1: 100008
|
||||
second: pCylinder1
|
||||
- first:
|
||||
4: 400000
|
||||
second: //RootNode
|
||||
- first:
|
||||
4: 400002
|
||||
second: pCube2
|
||||
- first:
|
||||
4: 400004
|
||||
second: pCube3
|
||||
- first:
|
||||
4: 400006
|
||||
second: pCube4
|
||||
- first:
|
||||
4: 400008
|
||||
second: pCylinder1
|
||||
- first:
|
||||
23: 2300000
|
||||
second: pCube2
|
||||
- first:
|
||||
23: 2300002
|
||||
second: pCube3
|
||||
- first:
|
||||
23: 2300004
|
||||
second: pCube4
|
||||
- first:
|
||||
23: 2300006
|
||||
second: pCylinder1
|
||||
- first:
|
||||
33: 3300000
|
||||
second: pCube2
|
||||
- first:
|
||||
33: 3300002
|
||||
second: pCube3
|
||||
- first:
|
||||
33: 3300004
|
||||
second: pCube4
|
||||
- first:
|
||||
33: 3300006
|
||||
second: pCylinder1
|
||||
- first:
|
||||
43: 4300000
|
||||
second: pCylinder1
|
||||
- first:
|
||||
43: 4300002
|
||||
second: pCube2
|
||||
- first:
|
||||
43: 4300004
|
||||
second: pCube3
|
||||
- first:
|
||||
43: 4300006
|
||||
second: pCube4
|
||||
externalObjects: {}
|
||||
materials:
|
||||
materialImportMode: 0
|
||||
materialName: 0
|
||||
materialSearch: 1
|
||||
materialLocation: 0
|
||||
animations:
|
||||
legacyGenerateAnimations: 4
|
||||
bakeSimulation: 0
|
||||
resampleCurves: 1
|
||||
optimizeGameObjects: 0
|
||||
removeConstantScaleCurves: 0
|
||||
motionNodeName:
|
||||
rigImportErrors:
|
||||
rigImportWarnings:
|
||||
animationImportErrors:
|
||||
animationImportWarnings:
|
||||
animationRetargetingWarnings:
|
||||
animationDoRetargetingWarnings: 0
|
||||
importAnimatedCustomProperties: 0
|
||||
importConstraints: 0
|
||||
animationCompression: 1
|
||||
animationRotationError: 0.5
|
||||
animationPositionError: 0.5
|
||||
animationScaleError: 0.5
|
||||
animationWrapMode: 0
|
||||
extraExposedTransformPaths: []
|
||||
extraUserProperties: []
|
||||
clipAnimations: []
|
||||
isReadable: 1
|
||||
meshes:
|
||||
lODScreenPercentages: []
|
||||
globalScale: 40
|
||||
meshCompression: 0
|
||||
addColliders: 0
|
||||
useSRGBMaterialColor: 1
|
||||
sortHierarchyByName: 1
|
||||
importVisibility: 0
|
||||
importBlendShapes: 1
|
||||
importCameras: 0
|
||||
importLights: 0
|
||||
nodeNameCollisionStrategy: 0
|
||||
fileIdsGeneration: 1
|
||||
swapUVChannels: 0
|
||||
generateSecondaryUV: 0
|
||||
useFileUnits: 1
|
||||
keepQuads: 0
|
||||
weldVertices: 1
|
||||
bakeAxisConversion: 0
|
||||
preserveHierarchy: 0
|
||||
skinWeightsMode: 0
|
||||
maxBonesPerVertex: 4
|
||||
minBoneWeight: 0.001
|
||||
optimizeBones: 1
|
||||
meshOptimizationFlags: -1
|
||||
indexFormat: 1
|
||||
secondaryUVAngleDistortion: 8
|
||||
secondaryUVAreaDistortion: 15.000001
|
||||
secondaryUVHardAngle: 88
|
||||
secondaryUVMarginMethod: 0
|
||||
secondaryUVMinLightmapResolution: 40
|
||||
secondaryUVMinObjectScale: 1
|
||||
secondaryUVPackMargin: 4
|
||||
useFileScale: 1
|
||||
tangentSpace:
|
||||
normalSmoothAngle: 60
|
||||
normalImportMode: 0
|
||||
tangentImportMode: 3
|
||||
normalCalculationMode: 0
|
||||
legacyComputeAllNormalsFromSmoothingGroupsWhenMeshHasBlendShapes: 1
|
||||
blendShapeNormalImportMode: 1
|
||||
normalSmoothingSource: 0
|
||||
referencedClips: []
|
||||
importAnimation: 1
|
||||
humanDescription:
|
||||
serializedVersion: 3
|
||||
human: []
|
||||
skeleton: []
|
||||
armTwist: 0.5
|
||||
foreArmTwist: 0.5
|
||||
upperLegTwist: 0.5
|
||||
legTwist: 0.5
|
||||
armStretch: 0.05
|
||||
legStretch: 0.05
|
||||
feetSpacing: 0
|
||||
globalScale: 40
|
||||
rootMotionBoneName:
|
||||
hasTranslationDoF: 0
|
||||
hasExtraRoot: 0
|
||||
skeletonHasParents: 1
|
||||
lastHumanDescriptionAvatarSource: {instanceID: 0}
|
||||
autoGenerateAvatarMappingIfUnspecified: 1
|
||||
animationType: 0
|
||||
humanoidOversampling: 1
|
||||
avatarSetup: 0
|
||||
addHumanoidExtraRootOnlyWhenUsingAvatar: 0
|
||||
additionalBone: 0
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
Binary file not shown.
@@ -1,120 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 64df75de10b494f109b074d28a8eade0
|
||||
ModelImporter:
|
||||
serializedVersion: 21202
|
||||
internalIDToNameTable:
|
||||
- first:
|
||||
1: 100000
|
||||
second: //RootNode
|
||||
- first:
|
||||
4: 400000
|
||||
second: //RootNode
|
||||
- first:
|
||||
23: 2300000
|
||||
second: //RootNode
|
||||
- first:
|
||||
33: 3300000
|
||||
second: //RootNode
|
||||
- first:
|
||||
43: 4300000
|
||||
second: pCube1
|
||||
externalObjects: {}
|
||||
materials:
|
||||
materialImportMode: 0
|
||||
materialName: 0
|
||||
materialSearch: 1
|
||||
materialLocation: 0
|
||||
animations:
|
||||
legacyGenerateAnimations: 4
|
||||
bakeSimulation: 0
|
||||
resampleCurves: 1
|
||||
optimizeGameObjects: 0
|
||||
removeConstantScaleCurves: 0
|
||||
motionNodeName:
|
||||
rigImportErrors:
|
||||
rigImportWarnings:
|
||||
animationImportErrors:
|
||||
animationImportWarnings:
|
||||
animationRetargetingWarnings:
|
||||
animationDoRetargetingWarnings: 0
|
||||
importAnimatedCustomProperties: 0
|
||||
importConstraints: 0
|
||||
animationCompression: 1
|
||||
animationRotationError: 0.5
|
||||
animationPositionError: 0.5
|
||||
animationScaleError: 0.5
|
||||
animationWrapMode: 0
|
||||
extraExposedTransformPaths: []
|
||||
extraUserProperties: []
|
||||
clipAnimations: []
|
||||
isReadable: 1
|
||||
meshes:
|
||||
lODScreenPercentages: []
|
||||
globalScale: 500
|
||||
meshCompression: 0
|
||||
addColliders: 0
|
||||
useSRGBMaterialColor: 1
|
||||
sortHierarchyByName: 1
|
||||
importVisibility: 0
|
||||
importBlendShapes: 1
|
||||
importCameras: 0
|
||||
importLights: 0
|
||||
nodeNameCollisionStrategy: 0
|
||||
fileIdsGeneration: 1
|
||||
swapUVChannels: 0
|
||||
generateSecondaryUV: 0
|
||||
useFileUnits: 1
|
||||
keepQuads: 0
|
||||
weldVertices: 1
|
||||
bakeAxisConversion: 0
|
||||
preserveHierarchy: 0
|
||||
skinWeightsMode: 0
|
||||
maxBonesPerVertex: 4
|
||||
minBoneWeight: 0.001
|
||||
optimizeBones: 1
|
||||
meshOptimizationFlags: -1
|
||||
indexFormat: 1
|
||||
secondaryUVAngleDistortion: 8
|
||||
secondaryUVAreaDistortion: 15.000001
|
||||
secondaryUVHardAngle: 88
|
||||
secondaryUVMarginMethod: 0
|
||||
secondaryUVMinLightmapResolution: 40
|
||||
secondaryUVMinObjectScale: 1
|
||||
secondaryUVPackMargin: 4
|
||||
useFileScale: 1
|
||||
tangentSpace:
|
||||
normalSmoothAngle: 60
|
||||
normalImportMode: 0
|
||||
tangentImportMode: 3
|
||||
normalCalculationMode: 0
|
||||
legacyComputeAllNormalsFromSmoothingGroupsWhenMeshHasBlendShapes: 1
|
||||
blendShapeNormalImportMode: 1
|
||||
normalSmoothingSource: 0
|
||||
referencedClips: []
|
||||
importAnimation: 1
|
||||
humanDescription:
|
||||
serializedVersion: 3
|
||||
human: []
|
||||
skeleton: []
|
||||
armTwist: 0.5
|
||||
foreArmTwist: 0.5
|
||||
upperLegTwist: 0.5
|
||||
legTwist: 0.5
|
||||
armStretch: 0.05
|
||||
legStretch: 0.05
|
||||
feetSpacing: 0
|
||||
globalScale: 500
|
||||
rootMotionBoneName:
|
||||
hasTranslationDoF: 0
|
||||
hasExtraRoot: 0
|
||||
skeletonHasParents: 1
|
||||
lastHumanDescriptionAvatarSource: {instanceID: 0}
|
||||
autoGenerateAvatarMappingIfUnspecified: 1
|
||||
animationType: 0
|
||||
humanoidOversampling: 1
|
||||
avatarSetup: 0
|
||||
addHumanoidExtraRootOnlyWhenUsingAvatar: 0
|
||||
additionalBone: 0
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -1,8 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 2851bb019d40d478b971f640aac2a9ba
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -1,69 +0,0 @@
|
||||
using UnityEngine;
|
||||
using UnityEngine.Events;
|
||||
|
||||
namespace Obi.Samples
|
||||
{
|
||||
[RequireComponent(typeof(ObiSolver))]
|
||||
public class ActorActorCollisionDetector : MonoBehaviour
|
||||
{
|
||||
public struct ActorPair
|
||||
{
|
||||
public readonly ObiActor actorA;
|
||||
public readonly ObiActor actorB;
|
||||
public int particleA;
|
||||
public int particleB;
|
||||
|
||||
public ActorPair(ObiActor actorA, ObiActor actorB, int particleA, int particleB)
|
||||
{
|
||||
this.actorA = actorA;
|
||||
this.actorB = actorB;
|
||||
this.particleA = particleA;
|
||||
this.particleB = particleB;
|
||||
}
|
||||
}
|
||||
|
||||
public UnityEvent<ActorPair> callback;
|
||||
ObiSolver solver;
|
||||
|
||||
void OnEnable()
|
||||
{
|
||||
solver = GetComponent<Obi.ObiSolver>();
|
||||
solver.OnParticleCollision += Solver_OnCollision;
|
||||
}
|
||||
|
||||
void OnDisable()
|
||||
{
|
||||
solver.OnParticleCollision -= Solver_OnCollision;
|
||||
}
|
||||
|
||||
void Solver_OnCollision(object sender, ObiNativeContactList e)
|
||||
{
|
||||
if (!solver.initialized || callback == null) return;
|
||||
|
||||
// just iterate over all contacts in the current frame:
|
||||
foreach (Oni.Contact contact in e)
|
||||
{
|
||||
// if this one is an actual collision:
|
||||
if (contact.distance < 0.01)
|
||||
{
|
||||
// get the index of the first entry in the simplices array for both bodies:
|
||||
int startA = solver.simplexCounts.GetSimplexStartAndSize(contact.bodyA, out _);
|
||||
int startB = solver.simplexCounts.GetSimplexStartAndSize(contact.bodyB, out _);
|
||||
|
||||
// retrieve the index of both particles from the simplices array:
|
||||
int particleA = solver.simplices[startA];
|
||||
int particleB = solver.simplices[startB];
|
||||
|
||||
// retrieve info about both actors involved in the collision:
|
||||
var particleInActorA = solver.particleToActor[particleA];
|
||||
var particleInActorB = solver.particleToActor[particleB];
|
||||
|
||||
// if they're not the same actor, trigger a callback:
|
||||
if (particleInActorA != null && particleInActorB != null && particleInActorA.actor != particleInActorB.actor)
|
||||
callback.Invoke(new ActorPair(particleInActorA.actor, particleInActorB.actor, particleA, particleB));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
@@ -1,11 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: a5a3cc3afb7a14486848b022c300ea32
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -1,32 +0,0 @@
|
||||
using UnityEngine;
|
||||
using Obi;
|
||||
|
||||
namespace Obi.Samples
|
||||
{
|
||||
[RequireComponent(typeof(ObiActor))]
|
||||
public class ActorBlinker : MonoBehaviour
|
||||
{
|
||||
public Color neutralColor = Color.white;
|
||||
public Color highlightColor = Color.red;
|
||||
private ObiActor actor;
|
||||
|
||||
void Awake()
|
||||
{
|
||||
actor = GetComponent<ObiActor>();
|
||||
}
|
||||
|
||||
public void Blink(int particleIndex)
|
||||
{
|
||||
if (actor.solver != null)
|
||||
actor.solver.colors[particleIndex] = highlightColor;
|
||||
}
|
||||
|
||||
void LateUpdate()
|
||||
{
|
||||
if (actor.solver != null)
|
||||
for (int i = 0; i < actor.activeParticleCount; ++i)
|
||||
actor.solver.colors[actor.solverIndices[i]] += (neutralColor - actor.solver.colors[actor.solverIndices[i]]) * Time.deltaTime * 5;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
@@ -1,11 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: fbbc507232dcc4cb1ae27d9474ddbe70
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -1,23 +0,0 @@
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
|
||||
namespace Obi.Samples
|
||||
{
|
||||
public class ActorCOMTransform : MonoBehaviour
|
||||
{
|
||||
|
||||
public Vector3 offset;
|
||||
public ObiActor actor;
|
||||
|
||||
public void Update()
|
||||
{
|
||||
if (actor != null && actor.isLoaded)
|
||||
{
|
||||
Vector3 com;
|
||||
actor.GetMass(out com);
|
||||
transform.position = actor.solver.transform.TransformPoint(com) + offset;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,11 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: eaf186b4497d04a31853e3c6570848c7
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -1,33 +0,0 @@
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
|
||||
namespace Obi.Samples
|
||||
{
|
||||
public class ActorSpawner : MonoBehaviour
|
||||
{
|
||||
|
||||
public ObiActor template;
|
||||
|
||||
public int maxInstances = 32;
|
||||
public float spawnDelay = 0.3f;
|
||||
|
||||
private int instances = 0;
|
||||
private float timeFromLastSpawn = 0;
|
||||
|
||||
// Update is called once per frame
|
||||
void Update()
|
||||
{
|
||||
|
||||
timeFromLastSpawn += Time.deltaTime;
|
||||
|
||||
if (Input.GetMouseButtonDown(0) && instances < maxInstances && timeFromLastSpawn > spawnDelay)
|
||||
{
|
||||
GameObject go = Instantiate(template.gameObject, transform.position, Quaternion.identity);
|
||||
go.transform.SetParent(transform.parent);
|
||||
instances++;
|
||||
timeFromLastSpawn = 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,11 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 628acd4e2e0fc4c8eafc9a96563762a7
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -1,21 +0,0 @@
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
|
||||
namespace Obi.Samples
|
||||
{
|
||||
[RequireComponent(typeof(ObiActor))]
|
||||
public class AddRandomVelocity : MonoBehaviour
|
||||
{
|
||||
|
||||
public float intensity = 5;
|
||||
|
||||
void Update()
|
||||
{
|
||||
if (Input.GetKeyDown(KeyCode.Space))
|
||||
{
|
||||
GetComponent<ObiActor>().AddForce(UnityEngine.Random.onUnitSphere * intensity, ForceMode.VelocityChange);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,11 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 16f6da785ba3d49c1aff763a6f55e424
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -1,30 +0,0 @@
|
||||
using UnityEngine;
|
||||
|
||||
namespace Obi.Samples
|
||||
{
|
||||
public class Blinker : MonoBehaviour
|
||||
{
|
||||
|
||||
public Color highlightColor;
|
||||
|
||||
private Renderer rend;
|
||||
private Color original;
|
||||
|
||||
void Awake()
|
||||
{
|
||||
rend = GetComponent<Renderer>();
|
||||
original = rend.material.color;
|
||||
}
|
||||
|
||||
public void Blink()
|
||||
{
|
||||
rend.material.color = highlightColor;
|
||||
}
|
||||
|
||||
void LateUpdate()
|
||||
{
|
||||
rend.material.color += (original - rend.material.color) * Time.deltaTime * 5;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
@@ -1,12 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: b63f5717a039e488ab8ccfb80eda50e6
|
||||
timeCreated: 1494351303
|
||||
licenseType: Store
|
||||
MonoImporter:
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -1,9 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 4a1b43750986e462db0a210922ad76b1
|
||||
folderAsset: yes
|
||||
timeCreated: 1518001485
|
||||
licenseType: Store
|
||||
DefaultImporter:
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -1,229 +0,0 @@
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
|
||||
namespace Obi{
|
||||
|
||||
[RequireComponent(typeof(Rigidbody))]
|
||||
[RequireComponent(typeof(CapsuleCollider))]
|
||||
[RequireComponent(typeof(Animator))]
|
||||
public class ObiCharacter : MonoBehaviour {
|
||||
|
||||
[SerializeField] float m_MovingTurnSpeed = 360;
|
||||
[SerializeField] float m_StationaryTurnSpeed = 180;
|
||||
[SerializeField] float m_JumpPower = 12f;
|
||||
[Range(1f, 4f)][SerializeField] float m_GravityMultiplier = 2f;
|
||||
[SerializeField] float m_RunCycleLegOffset = 0.2f; //specific to the character in sample assets, will need to be modified to work with others
|
||||
[SerializeField] float m_MoveSpeedMultiplier = 1f;
|
||||
[SerializeField] float m_AnimSpeedMultiplier = 1f;
|
||||
[SerializeField] float m_GroundCheckDistance = 0.1f;
|
||||
|
||||
Rigidbody m_Rigidbody;
|
||||
Animator m_Animator;
|
||||
bool m_IsGrounded;
|
||||
float m_OrigGroundCheckDistance;
|
||||
const float k_Half = 0.5f;
|
||||
float m_TurnAmount;
|
||||
float m_ForwardAmount;
|
||||
Vector3 m_GroundNormal;
|
||||
float m_CapsuleHeight;
|
||||
Vector3 m_CapsuleCenter;
|
||||
CapsuleCollider m_Capsule;
|
||||
bool m_Crouching;
|
||||
|
||||
void Start()
|
||||
{
|
||||
Physics.IgnoreLayerCollision(LayerMask.NameToLayer("Default"),LayerMask.NameToLayer("Ignore Raycast"),true);
|
||||
|
||||
m_Animator = GetComponent<Animator>();
|
||||
m_Rigidbody = GetComponent<Rigidbody>();
|
||||
m_Capsule = GetComponent<CapsuleCollider>();
|
||||
m_CapsuleHeight = m_Capsule.height;
|
||||
m_CapsuleCenter = m_Capsule.center;
|
||||
|
||||
m_Rigidbody.constraints = RigidbodyConstraints.FreezeRotationX | RigidbodyConstraints.FreezeRotationY | RigidbodyConstraints.FreezeRotationZ;
|
||||
m_OrigGroundCheckDistance = m_GroundCheckDistance;
|
||||
}
|
||||
|
||||
|
||||
public void Move(Vector3 move, bool crouch, bool jump)
|
||||
{
|
||||
|
||||
// convert the world relative moveInput vector into a local-relative
|
||||
// turn amount and forward amount required to head in the desired
|
||||
// direction.
|
||||
if (move.magnitude > 1f) move.Normalize();
|
||||
move = transform.InverseTransformDirection(move);
|
||||
CheckGroundStatus();
|
||||
move = Vector3.ProjectOnPlane(move, m_GroundNormal);
|
||||
m_TurnAmount = Mathf.Atan2(move.x, move.z);
|
||||
m_ForwardAmount = move.z;
|
||||
|
||||
ApplyExtraTurnRotation();
|
||||
|
||||
// control and velocity handling is different when grounded and airborne:
|
||||
if (m_IsGrounded)
|
||||
{
|
||||
HandleGroundedMovement(crouch, jump);
|
||||
}
|
||||
else
|
||||
{
|
||||
HandleAirborneMovement();
|
||||
}
|
||||
|
||||
ScaleCapsuleForCrouching(crouch);
|
||||
PreventStandingInLowHeadroom();
|
||||
|
||||
// send input and other state parameters to the animator
|
||||
UpdateAnimator(move);
|
||||
}
|
||||
|
||||
|
||||
void ScaleCapsuleForCrouching(bool crouch)
|
||||
{
|
||||
if (m_IsGrounded && crouch)
|
||||
{
|
||||
if (m_Crouching) return;
|
||||
m_Capsule.height = m_Capsule.height / 2f;
|
||||
m_Capsule.center = m_Capsule.center / 2f;
|
||||
m_Crouching = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
Ray crouchRay = new Ray(m_Rigidbody.position + Vector3.up * m_Capsule.radius * k_Half, Vector3.up);
|
||||
float crouchRayLength = m_CapsuleHeight - m_Capsule.radius * k_Half;
|
||||
if (Physics.SphereCast(crouchRay, m_Capsule.radius * k_Half, crouchRayLength, ~Physics.IgnoreRaycastLayer, QueryTriggerInteraction.Ignore))
|
||||
{
|
||||
m_Crouching = true;
|
||||
return;
|
||||
}
|
||||
m_Capsule.height = m_CapsuleHeight;
|
||||
m_Capsule.center = m_CapsuleCenter;
|
||||
m_Crouching = false;
|
||||
}
|
||||
}
|
||||
|
||||
void PreventStandingInLowHeadroom()
|
||||
{
|
||||
// prevent standing up in crouch-only zones
|
||||
if (!m_Crouching)
|
||||
{
|
||||
Ray crouchRay = new Ray(m_Rigidbody.position + Vector3.up * m_Capsule.radius * k_Half, Vector3.up);
|
||||
float crouchRayLength = m_CapsuleHeight - m_Capsule.radius * k_Half;
|
||||
if (Physics.SphereCast(crouchRay, m_Capsule.radius * k_Half, crouchRayLength, ~Physics.IgnoreRaycastLayer, QueryTriggerInteraction.Ignore))
|
||||
{
|
||||
m_Crouching = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void UpdateAnimator(Vector3 move)
|
||||
{
|
||||
// update the animator parameters
|
||||
m_Animator.SetFloat("Forward", m_ForwardAmount, 0.1f, Time.deltaTime);
|
||||
m_Animator.SetFloat("Turn", m_TurnAmount, 0.1f, Time.deltaTime);
|
||||
m_Animator.SetBool("Crouch", m_Crouching);
|
||||
m_Animator.SetBool("OnGround", m_IsGrounded);
|
||||
if (!m_IsGrounded)
|
||||
{
|
||||
m_Animator.SetFloat("Jump", m_Rigidbody.linearVelocity.y);
|
||||
}
|
||||
|
||||
// calculate which leg is behind, so as to leave that leg trailing in the jump animation
|
||||
// (This code is reliant on the specific run cycle offset in our animations,
|
||||
// and assumes one leg passes the other at the normalized clip times of 0.0 and 0.5)
|
||||
float runCycle =
|
||||
Mathf.Repeat(
|
||||
m_Animator.GetCurrentAnimatorStateInfo(0).normalizedTime + m_RunCycleLegOffset, 1);
|
||||
float jumpLeg = (runCycle < k_Half ? 1 : -1) * m_ForwardAmount;
|
||||
if (m_IsGrounded)
|
||||
{
|
||||
m_Animator.SetFloat("JumpLeg", jumpLeg);
|
||||
}
|
||||
|
||||
// the anim speed multiplier allows the overall speed of walking/running to be tweaked in the inspector,
|
||||
// which affects the movement speed because of the root motion.
|
||||
if (m_IsGrounded && move.magnitude > 0)
|
||||
{
|
||||
m_Animator.speed = m_AnimSpeedMultiplier;
|
||||
}
|
||||
else
|
||||
{
|
||||
// don't use that while airborne
|
||||
m_Animator.speed = 1;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void HandleAirborneMovement()
|
||||
{
|
||||
// apply extra gravity from multiplier:
|
||||
Vector3 extraGravityForce = (Physics.gravity * m_GravityMultiplier) - Physics.gravity;
|
||||
m_Rigidbody.AddForce(extraGravityForce);
|
||||
|
||||
m_GroundCheckDistance = m_Rigidbody.linearVelocity.y < 0 ? m_OrigGroundCheckDistance : 0.01f;
|
||||
}
|
||||
|
||||
|
||||
void HandleGroundedMovement(bool crouch, bool jump)
|
||||
{
|
||||
// check whether conditions are right to allow a jump:
|
||||
if (jump && !crouch && m_Animator.GetCurrentAnimatorStateInfo(0).IsName("Grounded"))
|
||||
{
|
||||
// jump!
|
||||
m_Rigidbody.linearVelocity = new Vector3(m_Rigidbody.linearVelocity.x, m_JumpPower, m_Rigidbody.linearVelocity.z);
|
||||
m_IsGrounded = false;
|
||||
m_Animator.applyRootMotion = false;
|
||||
m_GroundCheckDistance = 0.1f;
|
||||
}
|
||||
}
|
||||
|
||||
void ApplyExtraTurnRotation()
|
||||
{
|
||||
// help the character turn faster (this is in addition to root rotation in the animation)
|
||||
float turnSpeed = Mathf.Lerp(m_StationaryTurnSpeed, m_MovingTurnSpeed, m_ForwardAmount);
|
||||
transform.Rotate(0, m_TurnAmount * turnSpeed * Time.deltaTime, 0);
|
||||
}
|
||||
|
||||
|
||||
public void OnAnimatorMove()
|
||||
{
|
||||
// we implement this function to override the default root motion.
|
||||
// this allows us to modify the positional speed before it's applied.
|
||||
if (m_IsGrounded)
|
||||
{
|
||||
Vector3 v = (m_Animator.deltaPosition * m_MoveSpeedMultiplier) / Time.deltaTime;
|
||||
|
||||
// we preserve the existing y part of the current velocity.
|
||||
v.y = m_Rigidbody.linearVelocity.y;
|
||||
m_Rigidbody.linearVelocity = v;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void CheckGroundStatus()
|
||||
{
|
||||
RaycastHit hitInfo;
|
||||
#if UNITY_EDITOR
|
||||
// helper to visualise the ground check ray in the scene view
|
||||
Debug.DrawLine(transform.position + (Vector3.up * 0.1f), transform.position + (Vector3.up * 0.1f) + (Vector3.down * m_GroundCheckDistance));
|
||||
#endif
|
||||
// 0.1f is a small offset to start the ray from inside the character
|
||||
// it is also good to note that the transform position in the sample assets is at the base of the character
|
||||
if (Physics.Raycast(transform.position + (Vector3.up * 0.1f), Vector3.down, out hitInfo, m_GroundCheckDistance,~Physics.IgnoreRaycastLayer))
|
||||
{
|
||||
m_GroundNormal = hitInfo.normal;
|
||||
m_IsGrounded = true;
|
||||
m_Animator.applyRootMotion = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
m_IsGrounded = false;
|
||||
m_GroundNormal = Vector3.up;
|
||||
m_Animator.applyRootMotion = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,11 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 30974edc9036841cebffee1d18425185
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -1,72 +0,0 @@
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
|
||||
|
||||
namespace Obi{
|
||||
|
||||
[RequireComponent(typeof (ObiCharacter))]
|
||||
public class SampleCharacterController : MonoBehaviour {
|
||||
|
||||
private ObiCharacter m_Character; // A reference to the ThirdPersonCharacter on the object
|
||||
private Transform m_Cam; // A reference to the main camera in the scenes transform
|
||||
private Vector3 m_CamForward; // The current forward direction of the camera
|
||||
private Vector3 m_Move;
|
||||
private bool m_Jump; // the world-relative desired move direction, calculated from the camForward and user input.
|
||||
|
||||
private void Start()
|
||||
{
|
||||
// get the transform of the main camera
|
||||
if (Camera.main != null)
|
||||
{
|
||||
m_Cam = Camera.main.transform;
|
||||
}
|
||||
else
|
||||
{
|
||||
Debug.LogWarning(
|
||||
"Warning: no main camera found. Third person character needs a Camera tagged \"MainCamera\", for camera-relative controls.");
|
||||
// we use self-relative controls in this case, which probably isn't what the user wants, but hey, we warned them!
|
||||
}
|
||||
|
||||
// get the third person character ( this should never be null due to require component )
|
||||
m_Character = GetComponent<ObiCharacter>();
|
||||
}
|
||||
|
||||
|
||||
private void Update()
|
||||
{
|
||||
if (!m_Jump)
|
||||
{
|
||||
m_Jump = Input.GetButtonDown("Jump");
|
||||
}
|
||||
|
||||
// read inputs
|
||||
float h = Input.GetAxis("Horizontal");
|
||||
float v = Input.GetAxis("Vertical");
|
||||
bool crouch = Input.GetKey(KeyCode.C);
|
||||
|
||||
// calculate move direction to pass to character
|
||||
if (m_Cam != null)
|
||||
{
|
||||
// calculate camera relative direction to move:
|
||||
m_CamForward = Vector3.Scale(m_Cam.forward, new Vector3(1, 0, 1)).normalized;
|
||||
m_Move = v*m_CamForward + h*m_Cam.right;
|
||||
}
|
||||
else
|
||||
{
|
||||
// we use world-relative directions in the case of no main camera
|
||||
m_Move = v*Vector3.forward + h*Vector3.right;
|
||||
}
|
||||
#if !MOBILE_INPUT
|
||||
// walk speed multiplier
|
||||
if (Input.GetKey(KeyCode.LeftShift)) m_Move *= 0.5f;
|
||||
#endif
|
||||
|
||||
// pass all parameters to the character control script
|
||||
m_Character.Move(m_Move, crouch, m_Jump);
|
||||
m_Jump = false;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,11 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: de9bce9a2c43c424d81e85ea229e0004
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -1,51 +0,0 @@
|
||||
using UnityEngine;
|
||||
|
||||
namespace Obi.Samples
|
||||
{
|
||||
[RequireComponent(typeof(ObiSolver))]
|
||||
public class ColliderHighlighter : MonoBehaviour
|
||||
{
|
||||
|
||||
ObiSolver solver;
|
||||
|
||||
void Awake()
|
||||
{
|
||||
solver = GetComponent<Obi.ObiSolver>();
|
||||
}
|
||||
|
||||
void OnEnable()
|
||||
{
|
||||
solver.OnCollision += Solver_OnCollision;
|
||||
}
|
||||
|
||||
void OnDisable()
|
||||
{
|
||||
solver.OnCollision -= Solver_OnCollision;
|
||||
}
|
||||
|
||||
void Solver_OnCollision(object sender, ObiNativeContactList e)
|
||||
{
|
||||
var colliderWorld = ObiColliderWorld.GetInstance();
|
||||
|
||||
for (int i = 0; i < e.count; ++i)
|
||||
{
|
||||
Oni.Contact c = e[i];
|
||||
// make sure this is an actual contact:
|
||||
if (c.distance < 0.01f)
|
||||
{
|
||||
// get the collider:
|
||||
var col = colliderWorld.colliderHandles[c.bodyB].owner;
|
||||
|
||||
if (col != null)
|
||||
{
|
||||
// make it blink:
|
||||
Blinker blinker = col.GetComponent<Blinker>();
|
||||
|
||||
if (blinker)
|
||||
blinker.Blink();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,12 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: ef31b6ca9a4124cb893de1adabbfab18
|
||||
timeCreated: 1458771359
|
||||
licenseType: Store
|
||||
MonoImporter:
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -1,97 +0,0 @@
|
||||
using UnityEngine;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace Obi.Samples
|
||||
{
|
||||
[RequireComponent(typeof(ObiSolver))]
|
||||
public class CollisionEventHandler : MonoBehaviour
|
||||
{
|
||||
|
||||
ObiSolver solver;
|
||||
public int contactCount;
|
||||
|
||||
ObiNativeContactList frame;
|
||||
|
||||
void Awake()
|
||||
{
|
||||
solver = GetComponent<Obi.ObiSolver>();
|
||||
}
|
||||
|
||||
void OnEnable()
|
||||
{
|
||||
solver.OnCollision += Solver_OnCollision;
|
||||
}
|
||||
|
||||
void OnDisable()
|
||||
{
|
||||
solver.OnCollision -= Solver_OnCollision;
|
||||
}
|
||||
|
||||
void Solver_OnCollision(object sender, ObiNativeContactList e)
|
||||
{
|
||||
frame = e;
|
||||
}
|
||||
|
||||
void OnDrawGizmos()
|
||||
{
|
||||
if (solver == null || frame == null) return;
|
||||
|
||||
Gizmos.matrix = solver.transform.localToWorldMatrix;
|
||||
|
||||
contactCount = frame.count;
|
||||
|
||||
for (int i = 0; i < frame.count; ++i)
|
||||
{
|
||||
var contact = frame[i];
|
||||
|
||||
//if (contact.distance > 0.001f) continue;
|
||||
|
||||
Gizmos.color = (contact.distance <= 0) ? Color.red : Color.green;
|
||||
|
||||
//Gizmos.color = new Color(((i * 100) % 255) / 255.0f, ((i * 50) % 255) / 255.0f, ((i * 20) % 255) / 255.0f);
|
||||
|
||||
Vector3 point = frame[i].pointB;
|
||||
|
||||
Gizmos.DrawSphere(point, 0.01f);
|
||||
|
||||
Gizmos.DrawRay(point, contact.normal * contact.distance);
|
||||
|
||||
Gizmos.color = Color.cyan;
|
||||
//Gizmos.DrawRay(point, contact.tangent * contact.tangentImpulse + contact.bitangent * contact.bitangentImpulse);
|
||||
|
||||
}
|
||||
|
||||
/*for (int i = 0; i < frame.count; ++i)
|
||||
{
|
||||
var contact = frame[i];
|
||||
|
||||
//if (contact.distance > 0.001f) continue;
|
||||
|
||||
Gizmos.color = (contact.distance <= 0) ? Color.red : Color.green;
|
||||
|
||||
//Gizmos.color = new Color(((i * 100) % 255) / 255.0f, ((i * 50) % 255) / 255.0f, ((i * 20) % 255) / 255.0f);
|
||||
|
||||
Vector3 point = Vector3.zero;//frame.contacts.Data[i].point;
|
||||
|
||||
int simplexStart = solver.simplexCounts.GetSimplexStartAndSize(contact.bodyB, out int simplexSize);
|
||||
|
||||
float radius = 0;
|
||||
for (int j = 0; j < simplexSize; ++j)
|
||||
{
|
||||
point += (Vector3)solver.positions[solver.simplices[simplexStart + j]] * contact.pointB[j];
|
||||
radius += solver.principalRadii[solver.simplices[simplexStart + j]].x * contact.pointB[j];
|
||||
}
|
||||
|
||||
Vector3 normal = contact.normal;
|
||||
|
||||
//Gizmos.DrawSphere(point + normal.normalized * frame.contacts[i].distance, 0.01f);
|
||||
|
||||
Gizmos.DrawSphere(point + normal * radius, 0.01f);
|
||||
|
||||
Gizmos.DrawRay(point + normal * radius, normal.normalized * contact.distance);
|
||||
}*/
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user