Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 3d0291c

Browse files
committed
move sheep around the paddock example
1 parent 3879308 commit 3d0291c

File tree

11 files changed

+842
-6
lines changed

11 files changed

+842
-6
lines changed

‎Assets/Materials.meta

Lines changed: 8 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎Assets/Materials/textureAtlas.mat

Lines changed: 77 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,77 @@
1+
%YAML 1.1
2+
%TAG !u! tag:unity3d.com,2011:
3+
--- !u!21 &2100000
4+
Material:
5+
serializedVersion: 6
6+
m_ObjectHideFlags: 0
7+
m_CorrespondingSourceObject: {fileID: 0}
8+
m_PrefabInstance: {fileID: 0}
9+
m_PrefabAsset: {fileID: 0}
10+
m_Name: textureAtlas
11+
m_Shader: {fileID: 46, guid: 0000000000000000f000000000000000, type: 0}
12+
m_ShaderKeywords:
13+
m_LightmapFlags: 4
14+
m_EnableInstancingVariants: 0
15+
m_DoubleSidedGI: 0
16+
m_CustomRenderQueue: -1
17+
stringTagMap: {}
18+
disabledShaderPasses: []
19+
m_SavedProperties:
20+
serializedVersion: 3
21+
m_TexEnvs:
22+
- _BumpMap:
23+
m_Texture: {fileID: 0}
24+
m_Scale: {x: 1, y: 1}
25+
m_Offset: {x: 0, y: 0}
26+
- _DetailAlbedoMap:
27+
m_Texture: {fileID: 0}
28+
m_Scale: {x: 1, y: 1}
29+
m_Offset: {x: 0, y: 0}
30+
- _DetailMask:
31+
m_Texture: {fileID: 0}
32+
m_Scale: {x: 1, y: 1}
33+
m_Offset: {x: 0, y: 0}
34+
- _DetailNormalMap:
35+
m_Texture: {fileID: 0}
36+
m_Scale: {x: 1, y: 1}
37+
m_Offset: {x: 0, y: 0}
38+
- _EmissionMap:
39+
m_Texture: {fileID: 0}
40+
m_Scale: {x: 1, y: 1}
41+
m_Offset: {x: 0, y: 0}
42+
- _MainTex:
43+
m_Texture: {fileID: 2800000, guid: 54e833db0a5fe4277bbd8ee0f78e7390, type: 3}
44+
m_Scale: {x: 1, y: 1}
45+
m_Offset: {x: 0, y: 0}
46+
- _MetallicGlossMap:
47+
m_Texture: {fileID: 0}
48+
m_Scale: {x: 1, y: 1}
49+
m_Offset: {x: 0, y: 0}
50+
- _OcclusionMap:
51+
m_Texture: {fileID: 0}
52+
m_Scale: {x: 1, y: 1}
53+
m_Offset: {x: 0, y: 0}
54+
- _ParallaxMap:
55+
m_Texture: {fileID: 0}
56+
m_Scale: {x: 1, y: 1}
57+
m_Offset: {x: 0, y: 0}
58+
m_Floats:
59+
- _BumpScale: 1
60+
- _Cutoff: 0.5
61+
- _DetailNormalMapScale: 1
62+
- _DstBlend: 0
63+
- _GlossMapScale: 1
64+
- _Glossiness: 0.5
65+
- _GlossyReflections: 1
66+
- _Metallic: 0
67+
- _Mode: 0
68+
- _OcclusionStrength: 1
69+
- _Parallax: 0.02
70+
- _SmoothnessTextureChannel: 0
71+
- _SpecularHighlights: 1
72+
- _SrcBlend: 1
73+
- _UVSec: 0
74+
- _ZWrite: 1
75+
m_Colors:
76+
- _Color: {r: 1, g: 1, b: 1, a: 1}
77+
- _EmissionColor: {r: 0, g: 0, b: 0, a: 1}

‎Assets/Materials/textureAtlas.mat.meta

Lines changed: 8 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎Assets/PlaneRayIntersection.cs

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,16 @@
22

33
public class PlaneRayIntersection : MonoBehaviour
44
{
5-
public GameObject sphere;
5+
public GameObject sheep;
66
public GameObject quad;
77

88
Plane mPlane;
99

1010
void Start()
1111
{
1212
Vector3[] vertices = quad.GetComponent<MeshFilter>().mesh.vertices;
13-
mPlane = new Plane(quad.transform.TransformPoint(vertices[0]), quad.transform.TransformPoint(vertices[1]), quad.transform.TransformPoint(vertices[2]));
13+
Vector3 yOffset = new Vector3(0, 0.3f, 0);
14+
mPlane = new Plane(quad.transform.TransformPoint(vertices[0]) + yOffset, quad.transform.TransformPoint(vertices[1]) + yOffset, quad.transform.TransformPoint(vertices[2]) + yOffset);
1415
}
1516

1617
void Update()
@@ -23,7 +24,7 @@ void Update()
2324
if (mPlane.Raycast(ray, out t))
2425
{
2526
Vector3 hitpoint = ray.GetPoint(t);
26-
sphere.transform.position = hitpoint;
27+
sheep.transform.position = hitpoint;
2728
}
2829
}
2930
}

‎Assets/Scenes/aircraft/Green.mat

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,20 +2,24 @@
22
%TAG !u! tag:unity3d.com,2011:
33
--- !u!21 &2100000
44
Material:
5-
serializedVersion: 6
5+
serializedVersion: 8
66
m_ObjectHideFlags: 0
77
m_CorrespondingSourceObject: {fileID: 0}
88
m_PrefabInstance: {fileID: 0}
99
m_PrefabAsset: {fileID: 0}
1010
m_Name: Green
1111
m_Shader: {fileID: 46, guid: 0000000000000000f000000000000000, type: 0}
12-
m_ShaderKeywords:
12+
m_Parent: {fileID: 0}
13+
m_ModifiedSerializedProperties: 0
14+
m_ValidKeywords: []
15+
m_InvalidKeywords: []
1316
m_LightmapFlags: 4
1417
m_EnableInstancingVariants: 0
1518
m_DoubleSidedGI: 0
1619
m_CustomRenderQueue: -1
1720
stringTagMap: {}
1821
disabledShaderPasses: []
22+
m_LockedProperties:
1923
m_SavedProperties:
2024
serializedVersion: 3
2125
m_TexEnvs:
@@ -55,6 +59,7 @@ Material:
5559
m_Texture: {fileID: 0}
5660
m_Scale: {x: 1, y: 1}
5761
m_Offset: {x: 0, y: 0}
62+
m_Ints: []
5863
m_Floats:
5964
- _BumpScale: 1
6065
- _Cutoff: 0.5
@@ -73,5 +78,6 @@ Material:
7378
- _UVSec: 0
7479
- _ZWrite: 1
7580
m_Colors:
76-
- _Color: {r: 0, g: 1, b: 0.08719444, a: 1}
81+
- _Color: {r: 0.067283735, g: 0.5283019, b: 0.10705791, a: 1}
7782
- _EmissionColor: {r: 0, g: 0, b: 0, a: 1}
83+
m_BuildTextureStacks: []

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /