Browse Source

custom camera follow

master
Sagittaeri 7 years ago
parent
commit
1ca9fd2610
34 changed files with 350 additions and 133 deletions
  1. BIN
      IronToad_UnityProject/Assets/Animations/WaveRing.controller
  2. +82
    -0
      IronToad_UnityProject/Assets/Art/Models/lightHouse_LOW.obj.meta
  3. +82
    -0
      IronToad_UnityProject/Assets/Art/Models/pier.obj.meta
  4. BIN
      IronToad_UnityProject/Assets/Materials/MaskMat.mat
  5. +8
    -0
      IronToad_UnityProject/Assets/Materials/MaskMat.mat.meta
  6. BIN
      IronToad_UnityProject/Assets/Models/M_Boat.FBX
  7. +16
    -1
      IronToad_UnityProject/Assets/Models/M_Boat.FBX.meta
  8. BIN
      IronToad_UnityProject/Assets/Models/Materials/No Name.mat
  9. BIN
      IronToad_UnityProject/Assets/Models/Materials/boat_LOW_defaultMat_C.mat
  10. +8
    -0
      IronToad_UnityProject/Assets/Models/Materials/boat_LOW_defaultMat_C.mat.meta
  11. BIN
      IronToad_UnityProject/Assets/Physics Materials/Water.physicMaterial
  12. +10
    -3
      IronToad_UnityProject/Assets/Scripts/BoatController.cs
  13. +17
    -0
      IronToad_UnityProject/Assets/Scripts/DontRotate.cs
  14. +12
    -0
      IronToad_UnityProject/Assets/Scripts/DontRotate.cs.meta
  15. +17
    -15
      IronToad_UnityProject/Assets/Scripts/PlayerController.cs
  16. +8
    -0
      IronToad_UnityProject/Assets/Scripts/WaterController.cs
  17. BIN
      IronToad_UnityProject/Assets/ShaderForge/Example Assets/Textures/sf_parallax_test_ao_height.tga
  18. +0
    -45
      IronToad_UnityProject/Assets/ShaderForge/Example Assets/Textures/sf_parallax_test_ao_height.tga.meta
  19. BIN
      IronToad_UnityProject/Assets/ShaderForge/Example Assets/Textures/sf_parallax_test_normals.tga
  20. +0
    -45
      IronToad_UnityProject/Assets/ShaderForge/Example Assets/Textures/sf_parallax_test_normals.tga.meta
  21. +18
    -0
      IronToad_UnityProject/Assets/Shaders/DepthMask.shader
  22. +9
    -0
      IronToad_UnityProject/Assets/Shaders/DepthMask.shader.meta
  23. +0
    -16
      IronToad_UnityProject/Assets/Sound.meta
  24. +2
    -2
      IronToad_UnityProject/Assets/Sound.meta~4053ea0ea1489f4604c1626fb0538989dd66037b
  25. +2
    -3
      IronToad_UnityProject/Assets/Sound.meta~4053ea0ea1489f4604c1626fb0538989dd66037b.meta
  26. +8
    -0
      IronToad_UnityProject/Assets/Sound.meta~4053ea0ea1489f4604c1626fb0538989dd66037b.meta~927ced4c4317bc1f86f167c9b1594cec30b8e540
  27. +1
    -3
      IronToad_UnityProject/Assets/Sound.meta~HEAD
  28. +14
    -0
      IronToad_UnityProject/Assets/Sound.meta~HEAD.meta
  29. +9
    -0
      IronToad_UnityProject/Assets/Sound/Music.meta
  30. +9
    -0
      IronToad_UnityProject/Assets/Sound/SFX.meta
  31. +9
    -0
      IronToad_UnityProject/Assets/Textures.meta
  32. +9
    -0
      IronToad_UnityProject/Assets/_Scenes/GreyBox_Prototype.meta
  33. BIN
      IronToad_UnityProject/Assets/_Scenes/GreyBox_Prototype.unity
  34. BIN
      IronToad_UnityProject/Assets/water/planeWater.prefab

BIN
IronToad_UnityProject/Assets/Animations/WaveRing.controller View File


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

@ -0,0 +1,82 @@
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:

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

@ -0,0 +1,82 @@
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:

BIN
IronToad_UnityProject/Assets/Materials/MaskMat.mat View File


+ 8
- 0
IronToad_UnityProject/Assets/Materials/MaskMat.mat.meta View File

@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 710e883f261d31a4ba94c2426f8eb901
timeCreated: 1485038326
licenseType: Free
NativeFormatImporter:
userData:
assetBundleName:
assetBundleVariant:

BIN
IronToad_UnityProject/Assets/Models/M_Boat.FBX View File


+ 16
- 1
IronToad_UnityProject/Assets/Models/M_Boat.FBX.meta View File

@ -6,10 +6,25 @@ ModelImporter:
serializedVersion: 19
fileIDToRecycleName:
100000: //RootNode
100002: boat_hull
100004: boat_sail
100006: hull_mask
400000: //RootNode
400002: boat_hull
400004: boat_sail
400006: hull_mask
2300000: //RootNode
2300002: boat_hull
2300004: boat_sail
2300006: hull_mask
3300000: //RootNode
3300002: boat_hull
3300004: boat_sail
3300006: hull_mask
4300000: boat
4300002: boat_hull
4300004: boat_sail
4300006: hull_mask
9500000: //RootNode
materials:
importMaterials: 1
@ -35,7 +50,7 @@ ModelImporter:
isReadable: 1
meshes:
lODScreenPercentages: []
globalScale: 0.2
globalScale: 1
meshCompression: 0
addColliders: 0
importBlendShapes: 1

BIN
IronToad_UnityProject/Assets/Models/Materials/No Name.mat View File


BIN
IronToad_UnityProject/Assets/Models/Materials/boat_LOW_defaultMat_C.mat View File


+ 8
- 0
IronToad_UnityProject/Assets/Models/Materials/boat_LOW_defaultMat_C.mat.meta View File

@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: d6bfbac740d713642a29680cd761c688
timeCreated: 1485038037
licenseType: Free
NativeFormatImporter:
userData:
assetBundleName:
assetBundleVariant:

BIN
IronToad_UnityProject/Assets/Physics Materials/Water.physicMaterial View File


+ 10
- 3
IronToad_UnityProject/Assets/Scripts/BoatController.cs View File

@ -6,7 +6,7 @@ using UnityEngine;
public class BoatController : BuoyantObject {
public float trunSpeed = 0.5f;
public float breakSpeed = 20f;
// Use this for initialization
void Start() {
@ -26,8 +26,15 @@ public class BoatController : BuoyantObject {
}
void OnCollisionEnter(Collision collision) {
if (collision.gameObject.CompareTag("Rock"))
NotificationServer.notify("show GameOverPanel");
if (collision.gameObject.CompareTag("Rock")) {
float forwardHitSpeed = Vector3.Project(collision.relativeVelocity, transform.forward).magnitude;
Debug.Log("Forward hit:" + forwardHitSpeed);
if (forwardHitSpeed > breakSpeed) {
NotificationServer.notify("show GameOverPanel");
}
}
}

+ 17
- 0
IronToad_UnityProject/Assets/Scripts/DontRotate.cs View File

@ -0,0 +1,17 @@
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class DontRotate : MonoBehaviour {
private Quaternion originalRot;
// Use this for initialization
void Start () {
originalRot = transform.rotation;
}
// Update is called once per frame
void Update () {
transform.rotation = originalRot;
}
}

+ 12
- 0
IronToad_UnityProject/Assets/Scripts/DontRotate.cs.meta View File

@ -0,0 +1,12 @@
fileFormatVersion: 2
guid: 676629218e9aa15459d02d01dea3c546
timeCreated: 1485038957
licenseType: Free
MonoImporter:
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

+ 17
- 15
IronToad_UnityProject/Assets/Scripts/PlayerController.cs View File

@ -4,7 +4,7 @@ using UnityEngine;
public class PlayerController : MonoBehaviour {
private static bool isLocked = false;
public bool isLocked = false;
public float power;
public float radius;
@ -12,6 +12,14 @@ public class PlayerController : MonoBehaviour {
public GameObject waveRing;
void Start() {
NotificationServer.register("show GameUI", showGameUI);
NotificationServer.register("hide GameUI", hideGameUI);
}
// Update is called once per frame
void Update () {
@ -26,14 +34,6 @@ public class PlayerController : MonoBehaviour {
if (Physics.Raycast(ray, out hit, Mathf.Infinity,rayMask)) {
Vector3 pos = hit.point;
pos.y += 1;
Quaternion rot = Quaternion.Euler(-90, 0, 0);
if (waveRing != null)
Destroy(Instantiate(waveRing, pos, rot),4);
WaterController waterScript = hit.collider.gameObject.GetComponent<WaterController>();
Debug.DrawLine(Camera.main.transform.position, hit.point, Color.red,1);
@ -48,12 +48,14 @@ public class PlayerController : MonoBehaviour {
}
/// <summary>
/// if true stops player from being able to click on water
/// </summary>
/// <param name="input"></param>
public static void lockControls(bool input) {
isLocked = input;
private void showGameUI() {
Debug.Log("UI open");
isLocked = false;
}
private void hideGameUI() {
Debug.Log("UI close");
isLocked = true;
}
}

+ 8
- 0
IronToad_UnityProject/Assets/Scripts/WaterController.cs View File

@ -13,6 +13,7 @@ public class WaterController : MonoBehaviour {
public float waveSpeed = 1;
public float maxWaveHeight = 2;
public GameObject rippleEffect;
#region Unity Functions
// Use this for initialization
@ -43,6 +44,13 @@ public class WaterController : MonoBehaviour {
point.y = transform.position.y;
Vector3 pos = point;
pos.y += 1;
Quaternion rot = Quaternion.Euler(-90, 0, 0);
if (rippleEffect != null)
Destroy(Instantiate(rippleEffect, pos, rot), 4);
Collider[] colliders = Physics.OverlapSphere(point, radius);
foreach (Collider hit in colliders) {
Debug.Log(hit.name);

BIN
IronToad_UnityProject/Assets/ShaderForge/Example Assets/Textures/sf_parallax_test_ao_height.tga View File

Before After

+ 0
- 45
IronToad_UnityProject/Assets/ShaderForge/Example Assets/Textures/sf_parallax_test_ao_height.tga.meta View File

@ -1,45 +0,0 @@
fileFormatVersion: 2
guid: 5fb7986dd6d0a8e4093ba82369dd6a4d
TextureImporter:
serializedVersion: 2
mipmaps:
mipMapMode: 0
enableMipMap: 1
linearTexture: 0
correctGamma: 0
fadeOut: 0
borderMipMap: 0
mipMapFadeDistanceStart: 1
mipMapFadeDistanceEnd: 3
bumpmap:
convertToNormalMap: 0
externalNormalMap: 0
heightScale: .25
normalMapFilter: 0
isReadable: 0
grayScaleToAlpha: 0
generateCubemap: 0
seamlessCubemap: 0
textureFormat: -1
maxTextureSize: 128
textureSettings:
filterMode: -1
aniso: -1
mipBias: -1
wrapMode: -1
nPOTScale: 1
lightmap: 0
compressionQuality: 50
spriteMode: 0
spriteExtrude: 1
spriteMeshType: 1
alignment: 0
spritePivot: {x: .5, y: .5}
spritePixelsToUnits: 100
alphaIsTransparency: 0
textureType: -1
buildTargetSettings: []
spriteSheet:
sprites: []
spritePackingTag:
userData:

BIN
IronToad_UnityProject/Assets/ShaderForge/Example Assets/Textures/sf_parallax_test_normals.tga View File

Before After

+ 0
- 45
IronToad_UnityProject/Assets/ShaderForge/Example Assets/Textures/sf_parallax_test_normals.tga.meta View File

@ -1,45 +0,0 @@
fileFormatVersion: 2
guid: cf20bfced7e912046a9ce991a4d775ec
TextureImporter:
serializedVersion: 2
mipmaps:
mipMapMode: 0
enableMipMap: 1
linearTexture: 1
correctGamma: 0
fadeOut: 0
borderMipMap: 0
mipMapFadeDistanceStart: 1
mipMapFadeDistanceEnd: 3
bumpmap:
convertToNormalMap: 0
externalNormalMap: 1
heightScale: .25
normalMapFilter: 0
isReadable: 0
grayScaleToAlpha: 0
generateCubemap: 0
seamlessCubemap: 0
textureFormat: -1
maxTextureSize: 128
textureSettings:
filterMode: -1
aniso: -1
mipBias: -1
wrapMode: -1
nPOTScale: 1
lightmap: 0
compressionQuality: 50
spriteMode: 0
spriteExtrude: 1
spriteMeshType: 1
alignment: 0
spritePivot: {x: .5, y: .5}
spritePixelsToUnits: 100
alphaIsTransparency: 0
textureType: 1
buildTargetSettings: []
spriteSheet:
sprites: []
spritePackingTag:
userData:

+ 18
- 0
IronToad_UnityProject/Assets/Shaders/DepthMask.shader View File

@ -0,0 +1,18 @@
Shader "Masked/Mask" {
SubShader {
// Render the mask after regular geometry, but before masked geometry and
// transparent things.
Tags {"Queue" = "Geometry+10" }
// Don't draw in the RGBA channels; just the depth buffer
ColorMask 0
ZWrite On
// Do nothing specific in the pass:
Pass {}
}
}

+ 9
- 0
IronToad_UnityProject/Assets/Shaders/DepthMask.shader.meta View File

@ -0,0 +1,9 @@
fileFormatVersion: 2
guid: 311e51b6b1845554098afdb56d60e28f
timeCreated: 1485038290
licenseType: Free
ShaderImporter:
defaultTextures: []
userData:
assetBundleName:
assetBundleVariant:

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

@ -1,16 +0,0 @@
fileFormatVersion: 2
<<<<<<< HEAD
guid: 0fbabcae9313543ffbf1429aeac3664d
folderAsset: yes
timeCreated: 1485006712
licenseType: Free
=======
guid: 73fb9ee280b0c75439600b4d5c3a6a7d
folderAsset: yes
timeCreated: 1484996421
licenseType: Pro
>>>>>>> 4dc44205d41ab697039660061470b5816237ab96
DefaultImporter:
userData:
assetBundleName:
assetBundleVariant:

IronToad_UnityProject/Assets/ShaderForge.meta → IronToad_UnityProject/Assets/Sound.meta~4053ea0ea1489f4604c1626fb0538989dd66037b View File

@ -1,7 +1,7 @@
fileFormatVersion: 2
guid: 94220348a13529a4490aa9ee3167e649
guid: 844c4f25011b45348a5db5bc5b4f956e
folderAsset: yes
timeCreated: 1484980467
timeCreated: 1485037848
licenseType: Pro
DefaultImporter:
userData:

IronToad_UnityProject/Assets/ShaderForge/Example Assets.meta → IronToad_UnityProject/Assets/Sound.meta~4053ea0ea1489f4604c1626fb0538989dd66037b.meta View File

@ -1,7 +1,6 @@
fileFormatVersion: 2
guid: 521359692b2816940bb04fd9950a9177
folderAsset: yes
timeCreated: 1484980467
guid: 3c7e12539b1e2c048bbfe0734108abba
timeCreated: 1485039339
licenseType: Pro
DefaultImporter:
userData:

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

@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 7a2ebb0518fbb4d46a3aa17dac934dce
timeCreated: 1485038927
licenseType: Free
DefaultImporter:
userData:
assetBundleName:
assetBundleVariant:

IronToad_UnityProject/Assets/ShaderForge/Example Assets/Textures.meta → IronToad_UnityProject/Assets/Sound.meta~HEAD View File

@ -1,8 +1,6 @@
fileFormatVersion: 2
guid: bc6edbce34ffe84498ddcb02eb143c3e
guid: 73fb9ee280b0c75439600b4d5c3a6a7d
folderAsset: yes
timeCreated: 1484980467
licenseType: Pro
DefaultImporter:
userData:
assetBundleName:

+ 14
- 0
IronToad_UnityProject/Assets/Sound.meta~HEAD.meta View File

@ -0,0 +1,14 @@
fileFormatVersion: 2
<<<<<<< HEAD
guid: 7562c5d08f15d254c92f6dbd50cd18c9
timeCreated: 1485039339
licenseType: Pro
=======
guid: 0fb49e3e0a97c2c4cb531c04d67f2615
timeCreated: 1485038927
licenseType: Free
>>>>>>> 927ced4c4317bc1f86f167c9b1594cec30b8e540
DefaultImporter:
userData:
assetBundleName:
assetBundleVariant:

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

@ -0,0 +1,9 @@
fileFormatVersion: 2
guid: 1715d56e0d2b68246a82993db31014ab
folderAsset: yes
timeCreated: 1485038927
licenseType: Free
DefaultImporter:
userData:
assetBundleName:
assetBundleVariant:

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

@ -0,0 +1,9 @@
fileFormatVersion: 2
guid: de5a3adcedb96f64183518ac89622ade
folderAsset: yes
timeCreated: 1485038927
licenseType: Free
DefaultImporter:
userData:
assetBundleName:
assetBundleVariant:

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

@ -0,0 +1,9 @@
fileFormatVersion: 2
guid: 2a6e699820a38a544acfc0015eb679a2
folderAsset: yes
timeCreated: 1484972317
licenseType: Free
DefaultImporter:
userData:
assetBundleName:
assetBundleVariant:

+ 9
- 0
IronToad_UnityProject/Assets/_Scenes/GreyBox_Prototype.meta View File

@ -0,0 +1,9 @@
fileFormatVersion: 2
guid: 338533d5d159c00478a9fb5321b7d922
folderAsset: yes
timeCreated: 1485007190
licenseType: Free
DefaultImporter:
userData:
assetBundleName:
assetBundleVariant:

BIN
IronToad_UnityProject/Assets/_Scenes/GreyBox_Prototype.unity View File


BIN
IronToad_UnityProject/Assets/water/planeWater.prefab View File


Loading…
Cancel
Save