lock rotation i think
This commit is contained in:
parent
8697f2947c
commit
511b005887
4 changed files with 65 additions and 1 deletions
32
Assets/sunset_box/GameObject.prefab
Normal file
32
Assets/sunset_box/GameObject.prefab
Normal file
|
@ -0,0 +1,32 @@
|
|||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!1 &8496610095942690802
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 346340643590905982}
|
||||
m_Layer: 0
|
||||
m_Name: GameObject
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!4 &346340643590905982
|
||||
Transform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 8496610095942690802}
|
||||
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
||||
m_LocalPosition: {x: -0.92657536, y: -0.24109477, z: 3.413753}
|
||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_Children: []
|
||||
m_Father: {fileID: 0}
|
||||
m_RootOrder: 0
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
7
Assets/sunset_box/GameObject.prefab.meta
Normal file
7
Assets/sunset_box/GameObject.prefab.meta
Normal file
|
@ -0,0 +1,7 @@
|
|||
fileFormatVersion: 2
|
||||
guid: b1075e33d7dbe17c9b7e6ff36e01c2e2
|
||||
PrefabImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
|
@ -134,6 +134,7 @@ GameObject:
|
|||
- component: {fileID: 733733047}
|
||||
- component: {fileID: 733733046}
|
||||
- component: {fileID: 733733051}
|
||||
- component: {fileID: 733733050}
|
||||
m_Layer: 0
|
||||
m_Name: SunsetBox
|
||||
m_TagString: Untagged
|
||||
|
@ -200,7 +201,7 @@ Transform:
|
|||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 733733045}
|
||||
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
||||
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:
|
||||
|
@ -209,6 +210,26 @@ Transform:
|
|||
m_Father: {fileID: 0}
|
||||
m_RootOrder: 1
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
--- !u!1818360609 &733733050
|
||||
RotationConstraint:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 733733045}
|
||||
m_Enabled: 1
|
||||
m_Weight: 1
|
||||
m_RotationAtRest: {x: 0, y: 0, z: 0}
|
||||
m_RotationOffset: {x: 0, y: 0, z: 0}
|
||||
m_AffectRotationX: 1
|
||||
m_AffectRotationY: 0
|
||||
m_AffectRotationZ: 1
|
||||
m_IsContraintActive: 1
|
||||
m_IsLocked: 1
|
||||
m_Sources:
|
||||
- sourceTransform: {fileID: 346340643590905982, guid: b1075e33d7dbe17c9b7e6ff36e01c2e2,
|
||||
type: 3}
|
||||
weight: 1
|
||||
--- !u!135 &733733051
|
||||
SphereCollider:
|
||||
m_ObjectHideFlags: 0
|
||||
|
|
|
@ -222,6 +222,7 @@
|
|||
float3 origin = mul(unity_ObjectToWorld, float4(0, 0, 0, 1));
|
||||
float3 sun_dir = (mul(unity_ObjectToWorld, float4(0, 0, -1, 1)) - origin) * float3(1, 0, 1);
|
||||
// sun_dir.y = sin(_Time.x * 10) * 0.05;
|
||||
sun_dir.y = 0.01;
|
||||
sun_dir = normalize(sun_dir);
|
||||
|
||||
float3 dir = normalize(i.hit_pos - i.cam_pos);
|
||||
|
@ -248,6 +249,9 @@
|
|||
|
||||
col = water_col * max(subsurf * 12 - 2, 0.7);
|
||||
|
||||
float diffuse = max(dot(sun_dir, water_normal), 0);
|
||||
col += water_col * _SunCol * diffuse * 10;
|
||||
|
||||
// float3 water_ao = get_ao(surface_pos.xz);
|
||||
// col = water_col * lerp(0.1, water_ao, _WaveStrength) * 7;
|
||||
|
||||
|
|
Loading…
Reference in a new issue