mirror of
https://github.com/nothke/quality-control.git
synced 2024-12-22 15:57:28 +00:00
Magnet cables
This commit is contained in:
parent
2de1111cd0
commit
81ad6d6390
BIN
Assets/Meshes/sliding_crane.fbx
(Stored with Git LFS)
BIN
Assets/Meshes/sliding_crane.fbx
(Stored with Git LFS)
Binary file not shown.
File diff suppressed because it is too large
Load Diff
@ -1658,10 +1658,6 @@ PrefabInstance:
|
|||||||
propertyPath: dropTarget
|
propertyPath: dropTarget
|
||||||
value:
|
value:
|
||||||
objectReference: {fileID: 1302384508}
|
objectReference: {fileID: 1302384508}
|
||||||
- target: {fileID: 5468670891441072218, guid: cdb590802e3f6bd4db6d5eddce994501, type: 3}
|
|
||||||
propertyPath: m_ConnectedBody
|
|
||||||
value:
|
|
||||||
objectReference: {fileID: 2048303034}
|
|
||||||
- target: {fileID: 8361960510235702639, guid: cdb590802e3f6bd4db6d5eddce994501, type: 3}
|
- target: {fileID: 8361960510235702639, guid: cdb590802e3f6bd4db6d5eddce994501, type: 3}
|
||||||
propertyPath: m_LocalPosition.x
|
propertyPath: m_LocalPosition.x
|
||||||
value: -69.1
|
value: -69.1
|
||||||
@ -1702,8 +1698,7 @@ PrefabInstance:
|
|||||||
propertyPath: m_LocalEulerAnglesHint.z
|
propertyPath: m_LocalEulerAnglesHint.z
|
||||||
value: 0
|
value: 0
|
||||||
objectReference: {fileID: 0}
|
objectReference: {fileID: 0}
|
||||||
m_RemovedComponents:
|
m_RemovedComponents: []
|
||||||
- {fileID: 3963365815468376412, guid: cdb590802e3f6bd4db6d5eddce994501, type: 3}
|
|
||||||
m_RemovedGameObjects: []
|
m_RemovedGameObjects: []
|
||||||
m_AddedGameObjects: []
|
m_AddedGameObjects: []
|
||||||
m_AddedComponents: []
|
m_AddedComponents: []
|
||||||
@ -2437,11 +2432,6 @@ MonoBehaviour:
|
|||||||
name:
|
name:
|
||||||
rb: {fileID: 0}
|
rb: {fileID: 0}
|
||||||
rotateAroundPoint: 0
|
rotateAroundPoint: 0
|
||||||
--- !u!54 &2048303034 stripped
|
|
||||||
Rigidbody:
|
|
||||||
m_CorrespondingSourceObject: {fileID: 649759971140379373, guid: cdb590802e3f6bd4db6d5eddce994501, type: 3}
|
|
||||||
m_PrefabInstance: {fileID: 1472280155}
|
|
||||||
m_PrefabAsset: {fileID: 0}
|
|
||||||
--- !u!4 &2085744658 stripped
|
--- !u!4 &2085744658 stripped
|
||||||
Transform:
|
Transform:
|
||||||
m_CorrespondingSourceObject: {fileID: 4353896453404184, guid: c75e91cf060bbf04e89204fa400606df, type: 3}
|
m_CorrespondingSourceObject: {fileID: 4353896453404184, guid: c75e91cf060bbf04e89204fa400606df, type: 3}
|
||||||
|
22
Assets/Scripts/LineAttachEnd.cs
Normal file
22
Assets/Scripts/LineAttachEnd.cs
Normal file
@ -0,0 +1,22 @@
|
|||||||
|
using System.Collections;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using UnityEngine;
|
||||||
|
|
||||||
|
public class LineAttachEnd : MonoBehaviour
|
||||||
|
{
|
||||||
|
public Transform anchor;
|
||||||
|
|
||||||
|
LineRenderer _line;
|
||||||
|
LineRenderer line { get { if (!_line) _line = GetComponent<LineRenderer>(); return _line; } }
|
||||||
|
|
||||||
|
private void Start()
|
||||||
|
{
|
||||||
|
line.useWorldSpace = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
void Update()
|
||||||
|
{
|
||||||
|
line.SetPosition(0, transform.position);
|
||||||
|
line.SetPosition(1, anchor.position);
|
||||||
|
}
|
||||||
|
}
|
11
Assets/Scripts/LineAttachEnd.cs.meta
Normal file
11
Assets/Scripts/LineAttachEnd.cs.meta
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
fileFormatVersion: 2
|
||||||
|
guid: 1cb77b9d79ad78c4d94f551335084d76
|
||||||
|
MonoImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
serializedVersion: 2
|
||||||
|
defaultReferences: []
|
||||||
|
executionOrder: 0
|
||||||
|
icon: {instanceID: 0}
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
@ -44,7 +44,7 @@ public class SlidingCrane : MonoBehaviour
|
|||||||
yMotion.AccelerateTo(yTgt);
|
yMotion.AccelerateTo(yTgt);
|
||||||
|
|
||||||
float x = Mathf.Lerp(-xRange, xRange, xMotion.progress);
|
float x = Mathf.Lerp(-xRange, xRange, xMotion.progress);
|
||||||
float y = yMotion.progress * yRange;
|
float y = yMotion.progress * yRange - 3;
|
||||||
|
|
||||||
xMotion.Update(Time.deltaTime);
|
xMotion.Update(Time.deltaTime);
|
||||||
yMotion.Update(Time.deltaTime);
|
yMotion.Update(Time.deltaTime);
|
||||||
|
Loading…
Reference in New Issue
Block a user