Browse Source

update smooth follow to be rotatable

master
Joshua Reason 7 years ago
parent
commit
a5579e5079
6 changed files with 24 additions and 165 deletions
  1. +0
    -82
      IronToad_UnityProject/Assets/Art/Models/lightHouse_LOW.obj.meta
  2. +0
    -82
      IronToad_UnityProject/Assets/Art/Models/pier.obj.meta
  3. +6
    -0
      IronToad_UnityProject/Assets/Scripts/CustomSmoothFollow.cs
  4. +1
    -1
      IronToad_UnityProject/Assets/Scripts/DontRotate.cs
  5. +9
    -0
      IronToad_UnityProject/Assets/Sound.meta
  6. +8
    -0
      IronToad_UnityProject/Assets/Sound.meta~4053ea0ea1489f4604c1626fb0538989dd66037b.meta~927ced4c4317bc1f86f167c9b1594cec30b8e540.meta

+ 0
- 82
IronToad_UnityProject/Assets/Art/Models/lightHouse_LOW.obj.meta View File

@ -1,82 +0,0 @@
fileFormatVersion: 2
guid: 919eb0dba9aa0da44aec3a80f1cf98ea
timeCreated: 1485000000
licenseType: Free
ModelImporter:
serializedVersion: 19
fileIDToRecycleName:
100000: lighthouse
100002: //RootNode
400000: lighthouse
400002: //RootNode
2300000: lighthouse
3300000: lighthouse
4300000: lighthouse
materials:
importMaterials: 1
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: 1
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:

+ 0
- 82
IronToad_UnityProject/Assets/Art/Models/pier.obj.meta View File

@ -1,82 +0,0 @@
fileFormatVersion: 2
guid: 37549450629db464abffe54861590cf3
timeCreated: 1485008673
licenseType: Free
ModelImporter:
serializedVersion: 19
fileIDToRecycleName:
100000: pCylinder3
100002: //RootNode
400000: pCylinder3
400002: //RootNode
2300000: pCylinder3
3300000: pCylinder3
4300000: pCylinder3
materials:
importMaterials: 1
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: 1
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:

+ 6
- 0
IronToad_UnityProject/Assets/Scripts/CustomSmoothFollow.cs View File

@ -12,6 +12,8 @@ public class CustomSmoothFollow : MonoBehaviour
public Vector3 damping; public Vector3 damping;
public string layerToMask = "CameraObstruct"; public string layerToMask = "CameraObstruct";
private int layerMask; private int layerMask;
[Range (0,360)]
public float offsetAngle = 90;
// Use this for initialization // Use this for initialization
void Start() void Start()
@ -66,5 +68,9 @@ public class CustomSmoothFollow : MonoBehaviour
Vector3 lookTarget = target.position; Vector3 lookTarget = target.position;
lookTarget.x = transform.position.x; lookTarget.x = transform.position.x;
transform.LookAt(lookTarget); transform.LookAt(lookTarget);
transform.RotateAround(target.transform.position, Vector3.up,offsetAngle);
} }
} }

+ 1
- 1
IronToad_UnityProject/Assets/Scripts/DontRotate.cs View File

@ -4,7 +4,7 @@ using UnityEngine;
public class DontRotate : MonoBehaviour { public class DontRotate : MonoBehaviour {
private Quaternion originalRot;
public Quaternion originalRot;
public float maxAngle; public float maxAngle;

+ 9
- 0
IronToad_UnityProject/Assets/Sound.meta View File

@ -0,0 +1,9 @@
fileFormatVersion: 2
guid: 844c4f25011b45348a5db5bc5b4f956e
folderAsset: yes
timeCreated: 1485037848
licenseType: Pro
DefaultImporter:
userData:
assetBundleName:
assetBundleVariant:

+ 8
- 0
IronToad_UnityProject/Assets/Sound.meta~4053ea0ea1489f4604c1626fb0538989dd66037b.meta~927ced4c4317bc1f86f167c9b1594cec30b8e540.meta View File

@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 34a7022eb6fa687419f3deb70d1f2380
timeCreated: 1485043520
licenseType: Free
DefaultImporter:
userData:
assetBundleName:
assetBundleVariant:

Loading…
Cancel
Save