This commit is contained in:
2018-11-10 20:44:41 +01:00
parent c09fe67961
commit b41db01a55
33 changed files with 6342 additions and 0 deletions
+162
View File
@@ -0,0 +1,162 @@
using System;
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class Foot : Component
{
double radians(double angle)
{
return (Math.PI / 180) * angle;
}
double degrees(double radians)
{
double degrees = (180 / Math.PI) * radians;
return (degrees);
}
// Inverse Kinemetics Region
double l3, s;
double l1=10, l2=15;
public double X, Y, Z;
public double rotationX=0, rotationY=0, rotationZ=0;
public double O1, O2, O3;
void RL3()
{
if ((X == 0) && (Z == 0))
l3 = 0;
else
l3 = Math.Sqrt(((X * X) + (Z * Z)));
if (X < 0)
l3 = l3 * -1;
}
double FO1()
{
if ((X != 0) & (Z != 0))
{
double a = (Z / X);
return degrees(Math.Atan((a)));
}
else
return degrees(Math.Atan(0.0)); // Math Error Protection.
}
double T1()
{
RL3();
double x2 = X * X;
double y2 = Y * Y;
double z2 = Z * Z;
s = Math.Sqrt(x2 + y2 + z2);
double t1 = 0;
double s2 = s * s;
if ((Y == 0) && (l3 == 0))
t1 = 0; // Math Error Protection.
else
t1 = degrees(Math.Atan2(l3, Y));
double a = (l1 * l1) - (l2 * l2) + s2;
double b = 2 * l1 * s;
double t2;
if (b == 0)
t2 = -180;// todo: figure out normal value;
else
t2 = degrees(Math.Acos(a / b));
double ret = 0;
//ret = t1 + Math.Abs(t2);
ret = t1 + t2;
return ret;
}
double T3()
{
double t = (l1 * l1) + (l2 * l2) - (s * s);
double t2 = (2 * l1 * l2);
double result = degrees(Math.Acos(t / t2));
return result;
}
void RotateX()
{
double nY = Y * Math.Cos(radians(rotationX)) - Z * Math.Sin(radians(rotationX));
double nZ = Y * Math.Sin(radians(rotationX)) + Z * Math.Cos(radians(rotationX));
Y = nY;
Z = nZ;
}
void RotateY()
{
double nZ = Z * Math.Cos(radians(rotationY)) - X * Math.Sin(radians(rotationY));
double nX = Z * Math.Sin(radians(rotationY)) + X * Math.Cos(radians(rotationY));
Z = nZ;
X = nX;
}
void RotateZ()
{
double nX = X * Math.Cos(radians(rotationZ)) - Y * Math.Sin(radians(rotationZ));
double nY = X * Math.Sin(radians(rotationZ)) + Y * Math.Cos(radians(rotationZ));
X = nX;
Y = nY;
}
public double translateX = 0;
public double translateY = 0;
public double translateZ = 0;
public bool invert = false;
public Vector3 pos = new Vector3(0, 0, 0);
public void setleg()
{
X += translateX;
Y += translateY;
Z += translateZ;
Y = Y * (invert ? -1 : 1);
X = X * (invert ? -1 : -1);
Z = Z * (invert ? -1 : -1);
/*RotateX();
RotateY();
RotateZ();*/
rotationY = rotationY * (invert ? 1 : 1);
// Z and X is working. Y has problems when combined with others.
Vector3 v = new Vector3((float)Z, (float)Y, (float)X);
v = Quaternion.Euler((float)rotationX, (float)rotationY, (float)rotationZ) * v;
Z = v.x;
Y = v.y;
X = v.z;
Y = Y * (invert ? -1 : 1);
X = X * (invert ? -1 : -1);
Z = Z * (invert ? -1 : -1);
X -= translateX;
Y -= translateY;
Z -= translateZ;
O1 = (90 - FO1());
O2 = T1();
O3 = 180 - T3();
Y = Y * -1;
pos = new Vector3((float)Z, (float)Y, (float)X);
}
}
+13
View File
@@ -0,0 +1,13 @@
fileFormatVersion: 2
guid: c9255406468231049ab79ec93b48f97e
timeCreated: 1541795571
licenseType: Free
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:
+74
View File
@@ -0,0 +1,74 @@
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class Leg : MonoBehaviour {
public Transform Hip1;
public Transform Hip2;
public Transform Knie;
public double a1 = 0;
public double a2 = 0;
public double a3 = 0;
public Vector3 point = new Vector3(10, 10, 0);
public Quaternion rotation = new Quaternion(0, 0, 0, 0);
public bool invert = false;
public double translateX = 5;
public double translateY = 0;
public double translateZ = 0;
public GameObject pointShouldBe;
public Vector3 pos = new Vector3(0, 0, 0);
private Foot foot = new Foot();
// Use this for initialization
void Start () {
}
// Update is called once per frame
void Update()
{
foot.X = point.x;
foot.Y = point.y * -1;
//foot.Z = point.z * (invert ? -1 : 1);
foot.Z = point.z * (invert ? 1 : -1);
foot.rotationX = rotation.x;
foot.rotationY = rotation.y * (invert ? -1 : 1);
foot.rotationZ = rotation.z * (invert ? -1 : 1);
foot.translateX = translateX;
foot.translateY = translateY;
foot.translateZ = translateZ;
foot.invert = invert;
foot.setleg();
if (!invert)
{
a1 = foot.O1 - 90;
a2 = 90 - foot.O2;
a3 = foot.O3 - 90;
}
else
{
a1 = (foot.O1 - 90)*-1;
a2 = 90 - foot.O2;
a3 = foot.O3 - 90;
}
Hip1.transform.localRotation = Quaternion.Euler(0, (float)a1, 0);
Hip2.transform.localRotation = Quaternion.Euler((float)a2, 0, 0);
Knie.transform.localRotation = Quaternion.Euler((float)a3, 0, 0);
pos = foot.pos;
pos.x = pos.x * (invert ? 1 : -1);
pointShouldBe.transform.localPosition = pos;
}
}
+13
View File
@@ -0,0 +1,13 @@
fileFormatVersion: 2
guid: 3c4e50b7048aa1f4aaee65a71c7626c3
timeCreated: 1541794260
licenseType: Free
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:
+3508
View File
File diff suppressed because it is too large Load Diff
+10
View File
@@ -0,0 +1,10 @@
fileFormatVersion: 2
guid: c2064a01ffb68a84fa55bd109ccf70a4
timeCreated: 1541791156
licenseType: Free
NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 100100000
userData:
assetBundleName:
assetBundleVariant:
+981
View File
@@ -0,0 +1,981 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!29 &1
OcclusionCullingSettings:
m_ObjectHideFlags: 0
serializedVersion: 2
m_OcclusionBakeSettings:
smallestOccluder: 5
smallestHole: 0.25
backfaceThreshold: 100
m_SceneGUID: 00000000000000000000000000000000
m_OcclusionCullingData: {fileID: 0}
--- !u!104 &2
RenderSettings:
m_ObjectHideFlags: 0
serializedVersion: 8
m_Fog: 0
m_FogColor: {r: 0.5, g: 0.5, b: 0.5, a: 1}
m_FogMode: 3
m_FogDensity: 0.01
m_LinearFogStart: 0
m_LinearFogEnd: 300
m_AmbientSkyColor: {r: 0.212, g: 0.227, b: 0.259, a: 1}
m_AmbientEquatorColor: {r: 0.114, g: 0.125, b: 0.133, a: 1}
m_AmbientGroundColor: {r: 0.047, g: 0.043, b: 0.035, a: 1}
m_AmbientIntensity: 1
m_AmbientMode: 0
m_SubtractiveShadowColor: {r: 0.42, g: 0.478, b: 0.627, a: 1}
m_SkyboxMaterial: {fileID: 10304, guid: 0000000000000000f000000000000000, type: 0}
m_HaloStrength: 0.5
m_FlareStrength: 1
m_FlareFadeSpeed: 3
m_HaloTexture: {fileID: 0}
m_SpotCookie: {fileID: 10001, guid: 0000000000000000e000000000000000, type: 0}
m_DefaultReflectionMode: 0
m_DefaultReflectionResolution: 128
m_ReflectionBounces: 1
m_ReflectionIntensity: 1
m_CustomReflection: {fileID: 0}
m_Sun: {fileID: 0}
m_IndirectSpecularColor: {r: 0.44657844, g: 0.49641222, b: 0.57481694, a: 1}
--- !u!157 &3
LightmapSettings:
m_ObjectHideFlags: 0
serializedVersion: 11
m_GIWorkflowMode: 0
m_GISettings:
serializedVersion: 2
m_BounceScale: 1
m_IndirectOutputScale: 1
m_AlbedoBoost: 1
m_TemporalCoherenceThreshold: 1
m_EnvironmentLightingMode: 0
m_EnableBakedLightmaps: 1
m_EnableRealtimeLightmaps: 1
m_LightmapEditorSettings:
serializedVersion: 9
m_Resolution: 2
m_BakeResolution: 40
m_TextureWidth: 1024
m_TextureHeight: 1024
m_AO: 0
m_AOMaxDistance: 1
m_CompAOExponent: 1
m_CompAOExponentDirect: 0
m_Padding: 2
m_LightmapParameters: {fileID: 0}
m_LightmapsBakeMode: 1
m_TextureCompression: 1
m_FinalGather: 0
m_FinalGatherFiltering: 1
m_FinalGatherRayCount: 256
m_ReflectionCompression: 2
m_MixedBakeMode: 2
m_BakeBackend: 0
m_PVRSampling: 1
m_PVRDirectSampleCount: 32
m_PVRSampleCount: 500
m_PVRBounces: 2
m_PVRFilterTypeDirect: 0
m_PVRFilterTypeIndirect: 0
m_PVRFilterTypeAO: 0
m_PVRFilteringMode: 1
m_PVRCulling: 1
m_PVRFilteringGaussRadiusDirect: 1
m_PVRFilteringGaussRadiusIndirect: 5
m_PVRFilteringGaussRadiusAO: 2
m_PVRFilteringAtrousPositionSigmaDirect: 0.5
m_PVRFilteringAtrousPositionSigmaIndirect: 2
m_PVRFilteringAtrousPositionSigmaAO: 1
m_ShowResolutionOverlay: 1
m_LightingDataAsset: {fileID: 0}
m_UseShadowmask: 1
--- !u!196 &4
NavMeshSettings:
serializedVersion: 2
m_ObjectHideFlags: 0
m_BuildSettings:
serializedVersion: 2
agentTypeID: 0
agentRadius: 0.5
agentHeight: 2
agentSlope: 45
agentClimb: 0.4
ledgeDropHeight: 0
maxJumpAcrossDistance: 0
minRegionArea: 2
manualCellSize: 0
cellSize: 0.16666667
manualTileSize: 0
tileSize: 256
accuratePlacement: 0
debug:
m_Flags: 0
m_NavMeshData: {fileID: 0}
--- !u!1001 &163545138
Prefab:
m_ObjectHideFlags: 0
serializedVersion: 2
m_Modification:
m_TransformParent: {fileID: 2129559091}
m_Modifications:
- target: {fileID: 4155399062790474, guid: c2064a01ffb68a84fa55bd109ccf70a4, type: 2}
propertyPath: m_LocalPosition.x
value: -5
objectReference: {fileID: 0}
- target: {fileID: 4155399062790474, guid: c2064a01ffb68a84fa55bd109ccf70a4, type: 2}
propertyPath: m_LocalPosition.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 4155399062790474, guid: c2064a01ffb68a84fa55bd109ccf70a4, type: 2}
propertyPath: m_LocalPosition.z
value: -5
objectReference: {fileID: 0}
- target: {fileID: 4155399062790474, guid: c2064a01ffb68a84fa55bd109ccf70a4, type: 2}
propertyPath: m_LocalRotation.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 4155399062790474, guid: c2064a01ffb68a84fa55bd109ccf70a4, type: 2}
propertyPath: m_LocalRotation.y
value: 1
objectReference: {fileID: 0}
- target: {fileID: 4155399062790474, guid: c2064a01ffb68a84fa55bd109ccf70a4, type: 2}
propertyPath: m_LocalRotation.z
value: 0
objectReference: {fileID: 0}
- target: {fileID: 4155399062790474, guid: c2064a01ffb68a84fa55bd109ccf70a4, type: 2}
propertyPath: m_LocalRotation.w
value: 0
objectReference: {fileID: 0}
- target: {fileID: 4155399062790474, guid: c2064a01ffb68a84fa55bd109ccf70a4, type: 2}
propertyPath: m_RootOrder
value: 4
objectReference: {fileID: 0}
- target: {fileID: 1982254542225814, guid: c2064a01ffb68a84fa55bd109ccf70a4, type: 2}
propertyPath: m_Name
value: Leg
objectReference: {fileID: 0}
- target: {fileID: 4155399062790474, guid: c2064a01ffb68a84fa55bd109ccf70a4, type: 2}
propertyPath: m_LocalEulerAnglesHint.y
value: 180
objectReference: {fileID: 0}
- target: {fileID: 4887703732775378, guid: c2064a01ffb68a84fa55bd109ccf70a4, type: 2}
propertyPath: m_LocalRotation.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 4887703732775378, guid: c2064a01ffb68a84fa55bd109ccf70a4, type: 2}
propertyPath: m_LocalRotation.w
value: 0.9914449
objectReference: {fileID: 0}
- target: {fileID: 4887703732775378, guid: c2064a01ffb68a84fa55bd109ccf70a4, type: 2}
propertyPath: m_LocalEulerAnglesHint.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 4887703732775378, guid: c2064a01ffb68a84fa55bd109ccf70a4, type: 2}
propertyPath: m_LocalRotation.y
value: 0.13052616
objectReference: {fileID: 0}
- target: {fileID: 4887703732775378, guid: c2064a01ffb68a84fa55bd109ccf70a4, type: 2}
propertyPath: m_LocalEulerAnglesHint.y
value: 15
objectReference: {fileID: 0}
- target: {fileID: 1982254542225814, guid: c2064a01ffb68a84fa55bd109ccf70a4, type: 2}
propertyPath: m_IsActive
value: 1
objectReference: {fileID: 0}
- target: {fileID: 114741880654588862, guid: c2064a01ffb68a84fa55bd109ccf70a4,
type: 2}
propertyPath: invert
value: 1
objectReference: {fileID: 0}
- target: {fileID: 114741880654588862, guid: c2064a01ffb68a84fa55bd109ccf70a4,
type: 2}
propertyPath: point.z
value: 1
objectReference: {fileID: 0}
- target: {fileID: 114741880654588862, guid: c2064a01ffb68a84fa55bd109ccf70a4,
type: 2}
propertyPath: point.y
value: -10
objectReference: {fileID: 0}
- target: {fileID: 114741880654588862, guid: c2064a01ffb68a84fa55bd109ccf70a4,
type: 2}
propertyPath: point.x
value: 10
objectReference: {fileID: 0}
- target: {fileID: 114741880654588862, guid: c2064a01ffb68a84fa55bd109ccf70a4,
type: 2}
propertyPath: translateZ
value: 5
objectReference: {fileID: 0}
m_RemovedComponents: []
m_ParentPrefab: {fileID: 100100000, guid: c2064a01ffb68a84fa55bd109ccf70a4, type: 2}
m_IsPrefabParent: 0
--- !u!4 &163545139 stripped
Transform:
m_PrefabParentObject: {fileID: 4155399062790474, guid: c2064a01ffb68a84fa55bd109ccf70a4,
type: 2}
m_PrefabInternal: {fileID: 163545138}
--- !u!1 &210611261 stripped
GameObject:
m_PrefabParentObject: {fileID: 1982254542225814, guid: c2064a01ffb68a84fa55bd109ccf70a4,
type: 2}
m_PrefabInternal: {fileID: 1245260120}
--- !u!1 &311513960
GameObject:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
serializedVersion: 5
m_Component:
- component: {fileID: 311513961}
- component: {fileID: 311513962}
m_Layer: 0
m_Name: RotationControl
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!4 &311513961
Transform:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 311513960}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: -14.586548, y: -13.330619, z: -1.2657762}
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children: []
m_Father: {fileID: 0}
m_RootOrder: 2
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!114 &311513962
MonoBehaviour:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 311513960}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 30ea8dc0510444c42ae4b4db1f5ee2bd, type: 3}
m_Name:
m_EditorClassIdentifier:
rotation: {x: 0, y: 0, z: 0, w: 0}
rotation2:
- {fileID: 636309705}
- {fileID: 596626244}
- {fileID: 1619174560}
- {fileID: 1453644144}
- {fileID: 1772413224}
- {fileID: 210611261}
body: {fileID: 2129559090}
min: -15
max: 15
speed: 0.3
speed2: 0.3
speed3: 0.1
--- !u!1 &596626244 stripped
GameObject:
m_PrefabParentObject: {fileID: 1982254542225814, guid: c2064a01ffb68a84fa55bd109ccf70a4,
type: 2}
m_PrefabInternal: {fileID: 1681627338}
--- !u!1 &636309705 stripped
GameObject:
m_PrefabParentObject: {fileID: 1982254542225814, guid: c2064a01ffb68a84fa55bd109ccf70a4,
type: 2}
m_PrefabInternal: {fileID: 1665900829}
--- !u!4 &653454402 stripped
Transform:
m_PrefabParentObject: {fileID: 4155399062790474, guid: c2064a01ffb68a84fa55bd109ccf70a4,
type: 2}
m_PrefabInternal: {fileID: 1681627338}
--- !u!1001 &658472410
Prefab:
m_ObjectHideFlags: 0
serializedVersion: 2
m_Modification:
m_TransformParent: {fileID: 2129559091}
m_Modifications:
- target: {fileID: 4155399062790474, guid: c2064a01ffb68a84fa55bd109ccf70a4, type: 2}
propertyPath: m_LocalPosition.x
value: 5
objectReference: {fileID: 0}
- target: {fileID: 4155399062790474, guid: c2064a01ffb68a84fa55bd109ccf70a4, type: 2}
propertyPath: m_LocalPosition.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 4155399062790474, guid: c2064a01ffb68a84fa55bd109ccf70a4, type: 2}
propertyPath: m_LocalPosition.z
value: 5
objectReference: {fileID: 0}
- target: {fileID: 4155399062790474, guid: c2064a01ffb68a84fa55bd109ccf70a4, type: 2}
propertyPath: m_LocalRotation.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 4155399062790474, guid: c2064a01ffb68a84fa55bd109ccf70a4, type: 2}
propertyPath: m_LocalRotation.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 4155399062790474, guid: c2064a01ffb68a84fa55bd109ccf70a4, type: 2}
propertyPath: m_LocalRotation.z
value: 0
objectReference: {fileID: 0}
- target: {fileID: 4155399062790474, guid: c2064a01ffb68a84fa55bd109ccf70a4, type: 2}
propertyPath: m_LocalRotation.w
value: 1
objectReference: {fileID: 0}
- target: {fileID: 4155399062790474, guid: c2064a01ffb68a84fa55bd109ccf70a4, type: 2}
propertyPath: m_RootOrder
value: 3
objectReference: {fileID: 0}
- target: {fileID: 1982254542225814, guid: c2064a01ffb68a84fa55bd109ccf70a4, type: 2}
propertyPath: m_Name
value: Leg
objectReference: {fileID: 0}
- target: {fileID: 4887703732775378, guid: c2064a01ffb68a84fa55bd109ccf70a4, type: 2}
propertyPath: m_LocalRotation.y
value: 0.13052616
objectReference: {fileID: 0}
- target: {fileID: 4887703732775378, guid: c2064a01ffb68a84fa55bd109ccf70a4, type: 2}
propertyPath: m_LocalRotation.w
value: 0.9914449
objectReference: {fileID: 0}
- target: {fileID: 4887703732775378, guid: c2064a01ffb68a84fa55bd109ccf70a4, type: 2}
propertyPath: m_LocalEulerAnglesHint.y
value: 15
objectReference: {fileID: 0}
- target: {fileID: 1982254542225814, guid: c2064a01ffb68a84fa55bd109ccf70a4, type: 2}
propertyPath: m_IsActive
value: 1
objectReference: {fileID: 0}
- target: {fileID: 114741880654588862, guid: c2064a01ffb68a84fa55bd109ccf70a4,
type: 2}
propertyPath: invert
value: 0
objectReference: {fileID: 0}
- target: {fileID: 114741880654588862, guid: c2064a01ffb68a84fa55bd109ccf70a4,
type: 2}
propertyPath: point.z
value: -1
objectReference: {fileID: 0}
- target: {fileID: 114741880654588862, guid: c2064a01ffb68a84fa55bd109ccf70a4,
type: 2}
propertyPath: point.y
value: -10
objectReference: {fileID: 0}
- target: {fileID: 114741880654588862, guid: c2064a01ffb68a84fa55bd109ccf70a4,
type: 2}
propertyPath: point.x
value: 10
objectReference: {fileID: 0}
- target: {fileID: 114741880654588862, guid: c2064a01ffb68a84fa55bd109ccf70a4,
type: 2}
propertyPath: translateZ
value: -5
objectReference: {fileID: 0}
m_RemovedComponents: []
m_ParentPrefab: {fileID: 100100000, guid: c2064a01ffb68a84fa55bd109ccf70a4, type: 2}
m_IsPrefabParent: 0
--- !u!4 &658472411 stripped
Transform:
m_PrefabParentObject: {fileID: 4155399062790474, guid: c2064a01ffb68a84fa55bd109ccf70a4,
type: 2}
m_PrefabInternal: {fileID: 658472410}
--- !u!1001 &1051547783
Prefab:
m_ObjectHideFlags: 0
serializedVersion: 2
m_Modification:
m_TransformParent: {fileID: 2129559091}
m_Modifications:
- target: {fileID: 4155399062790474, guid: c2064a01ffb68a84fa55bd109ccf70a4, type: 2}
propertyPath: m_LocalPosition.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 4155399062790474, guid: c2064a01ffb68a84fa55bd109ccf70a4, type: 2}
propertyPath: m_LocalPosition.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 4155399062790474, guid: c2064a01ffb68a84fa55bd109ccf70a4, type: 2}
propertyPath: m_LocalPosition.z
value: -5
objectReference: {fileID: 0}
- target: {fileID: 4155399062790474, guid: c2064a01ffb68a84fa55bd109ccf70a4, type: 2}
propertyPath: m_LocalRotation.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 4155399062790474, guid: c2064a01ffb68a84fa55bd109ccf70a4, type: 2}
propertyPath: m_LocalRotation.y
value: 1
objectReference: {fileID: 0}
- target: {fileID: 4155399062790474, guid: c2064a01ffb68a84fa55bd109ccf70a4, type: 2}
propertyPath: m_LocalRotation.z
value: 0
objectReference: {fileID: 0}
- target: {fileID: 4155399062790474, guid: c2064a01ffb68a84fa55bd109ccf70a4, type: 2}
propertyPath: m_LocalRotation.w
value: 0
objectReference: {fileID: 0}
- target: {fileID: 4155399062790474, guid: c2064a01ffb68a84fa55bd109ccf70a4, type: 2}
propertyPath: m_RootOrder
value: 5
objectReference: {fileID: 0}
- target: {fileID: 1982254542225814, guid: c2064a01ffb68a84fa55bd109ccf70a4, type: 2}
propertyPath: m_Name
value: Leg
objectReference: {fileID: 0}
- target: {fileID: 4155399062790474, guid: c2064a01ffb68a84fa55bd109ccf70a4, type: 2}
propertyPath: m_LocalEulerAnglesHint.y
value: 180
objectReference: {fileID: 0}
- target: {fileID: 1982254542225814, guid: c2064a01ffb68a84fa55bd109ccf70a4, type: 2}
propertyPath: m_IsActive
value: 1
objectReference: {fileID: 0}
- target: {fileID: 114741880654588862, guid: c2064a01ffb68a84fa55bd109ccf70a4,
type: 2}
propertyPath: invert
value: 1
objectReference: {fileID: 0}
- target: {fileID: 114741880654588862, guid: c2064a01ffb68a84fa55bd109ccf70a4,
type: 2}
propertyPath: point.x
value: 10
objectReference: {fileID: 0}
- target: {fileID: 114741880654588862, guid: c2064a01ffb68a84fa55bd109ccf70a4,
type: 2}
propertyPath: point.y
value: -10
objectReference: {fileID: 0}
- target: {fileID: 114741880654588862, guid: c2064a01ffb68a84fa55bd109ccf70a4,
type: 2}
propertyPath: translateZ
value: 0
objectReference: {fileID: 0}
m_RemovedComponents: []
m_ParentPrefab: {fileID: 100100000, guid: c2064a01ffb68a84fa55bd109ccf70a4, type: 2}
m_IsPrefabParent: 0
--- !u!4 &1051547784 stripped
Transform:
m_PrefabParentObject: {fileID: 4155399062790474, guid: c2064a01ffb68a84fa55bd109ccf70a4,
type: 2}
m_PrefabInternal: {fileID: 1051547783}
--- !u!1001 &1245260120
Prefab:
m_ObjectHideFlags: 0
serializedVersion: 2
m_Modification:
m_TransformParent: {fileID: 2129559091}
m_Modifications:
- target: {fileID: 4155399062790474, guid: c2064a01ffb68a84fa55bd109ccf70a4, type: 2}
propertyPath: m_LocalPosition.x
value: 5
objectReference: {fileID: 0}
- target: {fileID: 4155399062790474, guid: c2064a01ffb68a84fa55bd109ccf70a4, type: 2}
propertyPath: m_LocalPosition.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 4155399062790474, guid: c2064a01ffb68a84fa55bd109ccf70a4, type: 2}
propertyPath: m_LocalPosition.z
value: -5
objectReference: {fileID: 0}
- target: {fileID: 4155399062790474, guid: c2064a01ffb68a84fa55bd109ccf70a4, type: 2}
propertyPath: m_LocalRotation.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 4155399062790474, guid: c2064a01ffb68a84fa55bd109ccf70a4, type: 2}
propertyPath: m_LocalRotation.y
value: 1
objectReference: {fileID: 0}
- target: {fileID: 4155399062790474, guid: c2064a01ffb68a84fa55bd109ccf70a4, type: 2}
propertyPath: m_LocalRotation.z
value: 0
objectReference: {fileID: 0}
- target: {fileID: 4155399062790474, guid: c2064a01ffb68a84fa55bd109ccf70a4, type: 2}
propertyPath: m_LocalRotation.w
value: 0
objectReference: {fileID: 0}
- target: {fileID: 4155399062790474, guid: c2064a01ffb68a84fa55bd109ccf70a4, type: 2}
propertyPath: m_RootOrder
value: 6
objectReference: {fileID: 0}
- target: {fileID: 1982254542225814, guid: c2064a01ffb68a84fa55bd109ccf70a4, type: 2}
propertyPath: m_Name
value: Leg
objectReference: {fileID: 0}
- target: {fileID: 4155399062790474, guid: c2064a01ffb68a84fa55bd109ccf70a4, type: 2}
propertyPath: m_LocalEulerAnglesHint.y
value: 180
objectReference: {fileID: 0}
- target: {fileID: 4887703732775378, guid: c2064a01ffb68a84fa55bd109ccf70a4, type: 2}
propertyPath: m_LocalRotation.y
value: -0.13052624
objectReference: {fileID: 0}
- target: {fileID: 4887703732775378, guid: c2064a01ffb68a84fa55bd109ccf70a4, type: 2}
propertyPath: m_LocalRotation.w
value: 0.9914449
objectReference: {fileID: 0}
- target: {fileID: 4887703732775378, guid: c2064a01ffb68a84fa55bd109ccf70a4, type: 2}
propertyPath: m_LocalEulerAnglesHint.y
value: -15
objectReference: {fileID: 0}
- target: {fileID: 1982254542225814, guid: c2064a01ffb68a84fa55bd109ccf70a4, type: 2}
propertyPath: m_IsActive
value: 1
objectReference: {fileID: 0}
- target: {fileID: 114741880654588862, guid: c2064a01ffb68a84fa55bd109ccf70a4,
type: 2}
propertyPath: invert
value: 1
objectReference: {fileID: 0}
- target: {fileID: 114741880654588862, guid: c2064a01ffb68a84fa55bd109ccf70a4,
type: 2}
propertyPath: point.z
value: -1
objectReference: {fileID: 0}
- target: {fileID: 114741880654588862, guid: c2064a01ffb68a84fa55bd109ccf70a4,
type: 2}
propertyPath: point.y
value: -10
objectReference: {fileID: 0}
- target: {fileID: 114741880654588862, guid: c2064a01ffb68a84fa55bd109ccf70a4,
type: 2}
propertyPath: point.x
value: 10
objectReference: {fileID: 0}
- target: {fileID: 114741880654588862, guid: c2064a01ffb68a84fa55bd109ccf70a4,
type: 2}
propertyPath: translateZ
value: -5
objectReference: {fileID: 0}
m_RemovedComponents: []
m_ParentPrefab: {fileID: 100100000, guid: c2064a01ffb68a84fa55bd109ccf70a4, type: 2}
m_IsPrefabParent: 0
--- !u!4 &1245260121 stripped
Transform:
m_PrefabParentObject: {fileID: 4155399062790474, guid: c2064a01ffb68a84fa55bd109ccf70a4,
type: 2}
m_PrefabInternal: {fileID: 1245260120}
--- !u!1 &1389944203
GameObject:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 1659089946116098, guid: 724361973d864ef4d957b37a51f94a9e,
type: 2}
m_PrefabInternal: {fileID: 0}
serializedVersion: 5
m_Component:
- component: {fileID: 1389944204}
- component: {fileID: 1389944207}
- component: {fileID: 1389944206}
- component: {fileID: 1389944205}
m_Layer: 0
m_Name: Cube
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!4 &1389944204
Transform:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 4666524806412162, guid: 724361973d864ef4d957b37a51f94a9e,
type: 2}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 1389944203}
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 10, y: 1, z: 10}
m_Children: []
m_Father: {fileID: 2129559091}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!23 &1389944205
MeshRenderer:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 23271557760752862, guid: 724361973d864ef4d957b37a51f94a9e,
type: 2}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 1389944203}
m_Enabled: 1
m_CastShadows: 1
m_ReceiveShadows: 1
m_DynamicOccludee: 1
m_MotionVectors: 1
m_LightProbeUsage: 1
m_ReflectionProbeUsage: 1
m_Materials:
- {fileID: 10303, guid: 0000000000000000f000000000000000, type: 0}
m_StaticBatchInfo:
firstSubMesh: 0
subMeshCount: 0
m_StaticBatchRoot: {fileID: 0}
m_ProbeAnchor: {fileID: 0}
m_LightProbeVolumeOverride: {fileID: 0}
m_ScaleInLightmap: 1
m_PreserveUVs: 1
m_IgnoreNormalsForChartDetection: 0
m_ImportantGI: 0
m_StitchLightmapSeams: 0
m_SelectedEditorRenderState: 3
m_MinimumChartSize: 4
m_AutoUVMaxDistance: 0.5
m_AutoUVMaxAngle: 89
m_LightmapParameters: {fileID: 0}
m_SortingLayerID: 0
m_SortingLayer: 0
m_SortingOrder: 0
--- !u!65 &1389944206
BoxCollider:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 65851153276042954, guid: 724361973d864ef4d957b37a51f94a9e,
type: 2}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 1389944203}
m_Material: {fileID: 0}
m_IsTrigger: 0
m_Enabled: 1
serializedVersion: 2
m_Size: {x: 1, y: 1, z: 1}
m_Center: {x: 0, y: 0, z: 0}
--- !u!33 &1389944207
MeshFilter:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 33292083258987710, guid: 724361973d864ef4d957b37a51f94a9e,
type: 2}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 1389944203}
m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0}
--- !u!1 &1453644144 stripped
GameObject:
m_PrefabParentObject: {fileID: 1982254542225814, guid: c2064a01ffb68a84fa55bd109ccf70a4,
type: 2}
m_PrefabInternal: {fileID: 163545138}
--- !u!1 &1619174560 stripped
GameObject:
m_PrefabParentObject: {fileID: 1982254542225814, guid: c2064a01ffb68a84fa55bd109ccf70a4,
type: 2}
m_PrefabInternal: {fileID: 658472410}
--- !u!1 &1640079160
GameObject:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
serializedVersion: 5
m_Component:
- component: {fileID: 1640079164}
- component: {fileID: 1640079163}
- component: {fileID: 1640079162}
- component: {fileID: 1640079161}
m_Layer: 0
m_Name: Main Camera
m_TagString: MainCamera
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!81 &1640079161
AudioListener:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 1640079160}
m_Enabled: 1
--- !u!124 &1640079162
Behaviour:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 1640079160}
m_Enabled: 1
--- !u!20 &1640079163
Camera:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 1640079160}
m_Enabled: 1
serializedVersion: 2
m_ClearFlags: 1
m_BackGroundColor: {r: 0.19215687, g: 0.3019608, b: 0.4745098, a: 0}
m_NormalizedViewPortRect:
serializedVersion: 2
x: 0
y: 0
width: 1
height: 1
near clip plane: 0.3
far clip plane: 1000
field of view: 60
orthographic: 0
orthographic size: 5
m_Depth: -1
m_CullingMask:
serializedVersion: 2
m_Bits: 4294967295
m_RenderingPath: -1
m_TargetTexture: {fileID: 0}
m_TargetDisplay: 0
m_TargetEye: 3
m_HDR: 1
m_AllowMSAA: 1
m_AllowDynamicResolution: 0
m_ForceIntoRT: 0
m_OcclusionCulling: 1
m_StereoConvergence: 10
m_StereoSeparation: 0.022
--- !u!4 &1640079164
Transform:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 1640079160}
m_LocalRotation: {x: 0.17348617, y: -0.7424655, z: 0.21076319, w: 0.61174047}
m_LocalPosition: {x: 18.06, y: 16.81, z: 9.77}
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children: []
m_Father: {fileID: 0}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 31.683, y: -101.023, z: 0.017}
--- !u!1001 &1665900829
Prefab:
m_ObjectHideFlags: 0
serializedVersion: 2
m_Modification:
m_TransformParent: {fileID: 2129559091}
m_Modifications:
- target: {fileID: 4155399062790474, guid: c2064a01ffb68a84fa55bd109ccf70a4, type: 2}
propertyPath: m_LocalPosition.x
value: -5
objectReference: {fileID: 0}
- target: {fileID: 4155399062790474, guid: c2064a01ffb68a84fa55bd109ccf70a4, type: 2}
propertyPath: m_LocalPosition.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 4155399062790474, guid: c2064a01ffb68a84fa55bd109ccf70a4, type: 2}
propertyPath: m_LocalPosition.z
value: 5
objectReference: {fileID: 0}
- target: {fileID: 4155399062790474, guid: c2064a01ffb68a84fa55bd109ccf70a4, type: 2}
propertyPath: m_LocalRotation.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 4155399062790474, guid: c2064a01ffb68a84fa55bd109ccf70a4, type: 2}
propertyPath: m_LocalRotation.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 4155399062790474, guid: c2064a01ffb68a84fa55bd109ccf70a4, type: 2}
propertyPath: m_LocalRotation.z
value: 0
objectReference: {fileID: 0}
- target: {fileID: 4155399062790474, guid: c2064a01ffb68a84fa55bd109ccf70a4, type: 2}
propertyPath: m_LocalRotation.w
value: 1
objectReference: {fileID: 0}
- target: {fileID: 4155399062790474, guid: c2064a01ffb68a84fa55bd109ccf70a4, type: 2}
propertyPath: m_RootOrder
value: 1
objectReference: {fileID: 0}
- target: {fileID: 4356114064656032, guid: c2064a01ffb68a84fa55bd109ccf70a4, type: 2}
propertyPath: m_LocalPosition.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 4356114064656032, guid: c2064a01ffb68a84fa55bd109ccf70a4, type: 2}
propertyPath: m_LocalPosition.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 4356114064656032, guid: c2064a01ffb68a84fa55bd109ccf70a4, type: 2}
propertyPath: m_LocalPosition.z
value: 0
objectReference: {fileID: 0}
- target: {fileID: 114741880654588862, guid: c2064a01ffb68a84fa55bd109ccf70a4,
type: 2}
propertyPath: point.x
value: 10
objectReference: {fileID: 0}
- target: {fileID: 114741880654588862, guid: c2064a01ffb68a84fa55bd109ccf70a4,
type: 2}
propertyPath: point.y
value: -10
objectReference: {fileID: 0}
m_RemovedComponents: []
m_ParentPrefab: {fileID: 100100000, guid: c2064a01ffb68a84fa55bd109ccf70a4, type: 2}
m_IsPrefabParent: 0
--- !u!1001 &1681627338
Prefab:
m_ObjectHideFlags: 0
serializedVersion: 2
m_Modification:
m_TransformParent: {fileID: 2129559091}
m_Modifications:
- target: {fileID: 4155399062790474, guid: c2064a01ffb68a84fa55bd109ccf70a4, type: 2}
propertyPath: m_LocalPosition.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 4155399062790474, guid: c2064a01ffb68a84fa55bd109ccf70a4, type: 2}
propertyPath: m_LocalPosition.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 4155399062790474, guid: c2064a01ffb68a84fa55bd109ccf70a4, type: 2}
propertyPath: m_LocalPosition.z
value: 5
objectReference: {fileID: 0}
- target: {fileID: 4155399062790474, guid: c2064a01ffb68a84fa55bd109ccf70a4, type: 2}
propertyPath: m_LocalRotation.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 4155399062790474, guid: c2064a01ffb68a84fa55bd109ccf70a4, type: 2}
propertyPath: m_LocalRotation.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 4155399062790474, guid: c2064a01ffb68a84fa55bd109ccf70a4, type: 2}
propertyPath: m_LocalRotation.z
value: 0
objectReference: {fileID: 0}
- target: {fileID: 4155399062790474, guid: c2064a01ffb68a84fa55bd109ccf70a4, type: 2}
propertyPath: m_LocalRotation.w
value: 1
objectReference: {fileID: 0}
- target: {fileID: 4155399062790474, guid: c2064a01ffb68a84fa55bd109ccf70a4, type: 2}
propertyPath: m_RootOrder
value: 2
objectReference: {fileID: 0}
- target: {fileID: 1982254542225814, guid: c2064a01ffb68a84fa55bd109ccf70a4, type: 2}
propertyPath: m_Name
value: Leg
objectReference: {fileID: 0}
- target: {fileID: 1982254542225814, guid: c2064a01ffb68a84fa55bd109ccf70a4, type: 2}
propertyPath: m_IsActive
value: 1
objectReference: {fileID: 0}
- target: {fileID: 114741880654588862, guid: c2064a01ffb68a84fa55bd109ccf70a4,
type: 2}
propertyPath: point.x
value: 10
objectReference: {fileID: 0}
- target: {fileID: 114741880654588862, guid: c2064a01ffb68a84fa55bd109ccf70a4,
type: 2}
propertyPath: point.y
value: -10
objectReference: {fileID: 0}
- target: {fileID: 114741880654588862, guid: c2064a01ffb68a84fa55bd109ccf70a4,
type: 2}
propertyPath: translateZ
value: 0
objectReference: {fileID: 0}
m_RemovedComponents: []
m_ParentPrefab: {fileID: 100100000, guid: c2064a01ffb68a84fa55bd109ccf70a4, type: 2}
m_IsPrefabParent: 0
--- !u!1 &1772413224 stripped
GameObject:
m_PrefabParentObject: {fileID: 1982254542225814, guid: c2064a01ffb68a84fa55bd109ccf70a4,
type: 2}
m_PrefabInternal: {fileID: 1051547783}
--- !u!4 &1786430462 stripped
Transform:
m_PrefabParentObject: {fileID: 4155399062790474, guid: c2064a01ffb68a84fa55bd109ccf70a4,
type: 2}
m_PrefabInternal: {fileID: 1665900829}
--- !u!1 &1867357888
GameObject:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
serializedVersion: 5
m_Component:
- component: {fileID: 1867357890}
- component: {fileID: 1867357889}
m_Layer: 0
m_Name: Directional Light
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!108 &1867357889
Light:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 1867357888}
m_Enabled: 1
serializedVersion: 8
m_Type: 1
m_Color: {r: 1, g: 0.95686275, b: 0.8392157, a: 1}
m_Intensity: 1
m_Range: 10
m_SpotAngle: 30
m_CookieSize: 10
m_Shadows:
m_Type: 2
m_Resolution: -1
m_CustomResolution: -1
m_Strength: 1
m_Bias: 0.05
m_NormalBias: 0.4
m_NearPlane: 0.2
m_Cookie: {fileID: 0}
m_DrawHalo: 0
m_Flare: {fileID: 0}
m_RenderMode: 0
m_CullingMask:
serializedVersion: 2
m_Bits: 4294967295
m_Lightmapping: 4
m_AreaSize: {x: 1, y: 1}
m_BounceIntensity: 1
m_ColorTemperature: 6570
m_UseColorTemperature: 0
m_ShadowRadius: 0
m_ShadowAngle: 0
--- !u!4 &1867357890
Transform:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 1867357888}
m_LocalRotation: {x: 0.40821788, y: -0.23456968, z: 0.10938163, w: 0.8754261}
m_LocalPosition: {x: 0, y: 3, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children: []
m_Father: {fileID: 0}
m_RootOrder: 1
m_LocalEulerAnglesHint: {x: 50, y: -30, z: 0}
--- !u!1 &2129559090
GameObject:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 1727510609459260, guid: 724361973d864ef4d957b37a51f94a9e,
type: 2}
m_PrefabInternal: {fileID: 0}
serializedVersion: 5
m_Component:
- component: {fileID: 2129559091}
m_Layer: 0
m_Name: Body
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!4 &2129559091
Transform:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 4346980781549154, guid: 724361973d864ef4d957b37a51f94a9e,
type: 2}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 2129559090}
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:
- {fileID: 1389944204}
- {fileID: 1786430462}
- {fileID: 653454402}
- {fileID: 658472411}
- {fileID: 163545139}
- {fileID: 1051547784}
- {fileID: 1245260121}
m_Father: {fileID: 0}
m_RootOrder: 3
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
+9
View File
@@ -0,0 +1,9 @@
fileFormatVersion: 2
guid: 5f4a5f0170e50d546b983a411916f66d
timeCreated: 1541789909
licenseType: Free
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:
+62
View File
@@ -0,0 +1,62 @@
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class RotationControl : MonoBehaviour
{
public Quaternion rotation = new Quaternion(0, 0, 0, 0);
public List<GameObject> rotation2 = new List<GameObject>();
public GameObject body;
public double min = -15;
public double max = 15;
public float speed = 0.3f;
public float speed2 = 0.3f;
public float speed3 = 0.3f;
bool dir = false;
bool dir2 = false;
bool dir3 = false;
// Use this for initialization
void Start ()
{
}
// Update is called once per frame
void Update()
{
/*if (!dir2 && rotation.x < max)
rotation.x += speed2;
else if (!dir2)
dir2 = !dir2;
else if (dir2 && rotation.x > min)
rotation.x -= speed2;
else if (dir2)
dir2 = !dir2;*/
/*if (!dir3 && rotation.y < max)
rotation.y += speed3;
else if (!dir3)
dir3 = !dir3;
else if (dir3 && rotation.y > min)
rotation.y -= speed3;
else if (dir3)
dir3 = !dir3;*/
/*if (!dir && rotation.z < max)
rotation.z += speed;
else if (!dir)
dir = !dir;
else if (dir && rotation.z > min)
rotation.z -= speed;
else if (dir)
dir = !dir;*/
body.transform.eulerAngles = new Vector3(rotation.x*-1, rotation.y, rotation.z);
for (int index = 0; index < rotation2.Count; ++index)
{
rotation2[index].GetComponent<Leg>().rotation = rotation;
}
}
}
+13
View File
@@ -0,0 +1,13 @@
fileFormatVersion: 2
guid: 30ea8dc0510444c42ae4b4db1f5ee2bd
timeCreated: 1541847613
licenseType: Free
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant: