WireCap EndPos interaction affordance + bugfixes, reset of fallen objects, button movement

This commit is contained in:
FreshMix committed 2025-11-05 12:32:33 +03:00
1 parent 7de0125751
commit 085d330a87
49 files changed
+13501 -12062

No files matched your search

+5 -1
View File
@@ -8,6 +8,9 @@ public class BabinaScript : MonoBehaviour
[SerializeField]
MeshRenderer RopeRenderer;
[SerializeField]
MeshRenderer WireCapRenderer;
[SerializeField]
GameObject EndPos;
@@ -25,7 +28,7 @@ public class BabinaScript : MonoBehaviour
}
// Update is called once per frame
void Update()
void LateUpdate()
{
if (SyncingWithSocket)
{
@@ -46,6 +49,7 @@ public class BabinaScript : MonoBehaviour
SocketAttach = v_SocketAttach;
SyncingWithSocket = true;
RopeRenderer.enabled = true;
WireCapRenderer.enabled = true;
}
}
Binary file not shown.
+110
View File
@@ -0,0 +1,110 @@
fileFormatVersion: 2
guid: 71bf2e0c48a8a284dafeb34e80131d56
ModelImporter:
serializedVersion: 24200
internalIDToNameTable: []
externalObjects: {}
materials:
materialImportMode: 2
materialName: 0
materialSearch: 1
materialLocation: 1
animations:
legacyGenerateAnimations: 4
bakeSimulation: 0
resampleCurves: 1
optimizeGameObjects: 0
removeConstantScaleCurves: 0
motionNodeName:
animationImportErrors:
animationImportWarnings:
animationRetargetingWarnings:
animationDoRetargetingWarnings: 0
importAnimatedCustomProperties: 0
importConstraints: 0
animationCompression: 1
animationRotationError: 0.5
animationPositionError: 0.5
animationScaleError: 0.5
animationWrapMode: 0
extraExposedTransformPaths: []
extraUserProperties: []
clipAnimations: []
isReadable: 0
meshes:
lODScreenPercentages: []
globalScale: 14.82752
meshCompression: 0
addColliders: 0
useSRGBMaterialColor: 1
sortHierarchyByName: 1
importPhysicalCameras: 1
importVisibility: 1
importBlendShapes: 1
importCameras: 1
importLights: 1
nodeNameCollisionStrategy: 1
fileIdsGeneration: 2
swapUVChannels: 0
generateSecondaryUV: 0
useFileUnits: 1
keepQuads: 0
weldVertices: 1
bakeAxisConversion: 0
preserveHierarchy: 0
skinWeightsMode: 0
maxBonesPerVertex: 4
minBoneWeight: 0.001
optimizeBones: 1
generateMeshLods: 0
meshLodGenerationFlags: 0
maximumMeshLod: -1
meshOptimizationFlags: -1
indexFormat: 0
secondaryUVAngleDistortion: 8
secondaryUVAreaDistortion: 15.000001
secondaryUVHardAngle: 88
secondaryUVMarginMethod: 1
secondaryUVMinLightmapResolution: 40
secondaryUVMinObjectScale: 1
secondaryUVPackMargin: 4
useFileScale: 1
strictVertexDataChecks: 0
tangentSpace:
normalSmoothAngle: 60
normalImportMode: 0
tangentImportMode: 3
normalCalculationMode: 4
legacyComputeAllNormalsFromSmoothingGroupsWhenMeshHasBlendShapes: 0
blendShapeNormalImportMode: 1
normalSmoothingSource: 0
referencedClips: []
importAnimation: 1
humanDescription:
serializedVersion: 3
human: []
skeleton: []
armTwist: 0.5
foreArmTwist: 0.5
upperLegTwist: 0.5
legTwist: 0.5
armStretch: 0.05
legStretch: 0.05
feetSpacing: 0
globalScale: 0.1482752
rootMotionBoneName:
hasTranslationDoF: 0
hasExtraRoot: 0
skeletonHasParents: 1
lastHumanDescriptionAvatarSource: {instanceID: 0}
autoGenerateAvatarMappingIfUnspecified: 1
animationType: 2
humanoidOversampling: 1
avatarSetup: 0
addHumanoidExtraRootOnlyWhenUsingAvatar: 1
importBlendShapeDeformPercent: 1
remapMaterialsIfMaterialImportModeIsNone: 0
additionalBone: 0
userData:
assetBundleName:
assetBundleVariant:
+35 -6
View File
@@ -6,31 +6,60 @@ public class MaterialRopeDetachAction : MonoBehaviour
{
[SerializeField]
Vector3 InitialCords;
[SerializeField]
Quaternion InitialRotation;
[SerializeField]
Quaternion InitialRotation;
//Rope Rope;
bool resetAsked = false;
XRGrabInteractable grabComponent;
// Start is called once before the first execution of Update after the MonoBehaviour is created
void Start()
{
grabComponent = gameObject.GetComponent<XRGrabInteractable>();
//InitialCords = transform.localPosition;
//InitialRotation = gameObject.transform.rotation;
//Rope = gameObject.GetComponentInChildren<Rope>();
//InvokeRepeating("DebugSender", 0f, 1f);
}
// Update is called once per frame
void Update()
void LateUpdate()
{
//Debug.Log(grabComponent.interactorsSelecting);
if (resetAsked)
{
Invoke("InvokedReset", 0.5f);
resetAsked = false;
}
}
void DebugSender()
{
Debug.Log("Ôóíêöèÿ âûçâàíà â: " + Time.time + "\n" + grabComponent.interactorsSelecting.Count);
}
void OnDestroy()
{
// Îñòàíîâèòü âûçîâû ïðè óíè÷òîæåíèè îáúåêòà
CancelInvoke("DebugSender");
}
public void reset()
{
//transform.localPosition = InitialCords;
//transform.rotation = InitialRotation;
//Rope.RecalculateRope();
// gameObject.GetComponent<XRGrabInteractable>().interactionManager.
//Invoke("InvokedReset", 0.1f);
resetAsked = true;
}
private void InvokedReset() {
transform.localPosition = InitialCords;
transform.rotation = InitialRotation;
//Rope.RecalculateRope();
}
}
File renamed without changes.
File renamed without changes.

Before

Width:  |  Height:  |  Size: 83 KiB

After

Width:  |  Height:  |  Size: 83 KiB

File renamed without changes.

Before

Width:  |  Height:  |  Size: 17 KiB

After

Width:  |  Height:  |  Size: 17 KiB

File renamed without changes.

Before

Width:  |  Height:  |  Size: 161 KiB

After

Width:  |  Height:  |  Size: 161 KiB

File renamed without changes.

Before

Width:  |  Height:  |  Size: 296 KiB

After

Width:  |  Height:  |  Size: 296 KiB

File renamed without changes.

Before

Width:  |  Height:  |  Size: 76 KiB

After

Width:  |  Height:  |  Size: 76 KiB

File renamed without changes.

Before

Width:  |  Height:  |  Size: 485 KiB

After

Width:  |  Height:  |  Size: 485 KiB

File renamed without changes.

Before

Width:  |  Height:  |  Size: 36 KiB

After

Width:  |  Height:  |  Size: 36 KiB

File renamed without changes.

Before

Width:  |  Height:  |  Size: 71 KiB

After

Width:  |  Height:  |  Size: 71 KiB

+143
View File
@@ -0,0 +1,143 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!114 &-3246141999843498532
MonoBehaviour:
m_ObjectHideFlags: 11
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 0}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: d0353a89b1f911e48b9e16bdc9f2e058, type: 3}
m_Name:
m_EditorClassIdentifier: Unity.RenderPipelines.Universal.Editor::UnityEditor.Rendering.Universal.AssetVersion
version: 10
--- !u!21 &2100000
Material:
serializedVersion: 8
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name: Red_cap
m_Shader: {fileID: 4800000, guid: 933532a4fcc9baf4fa0491de14d08ed7, type: 3}
m_Parent: {fileID: 0}
m_ModifiedSerializedProperties: 0
m_ValidKeywords:
- _ALPHAPREMULTIPLY_ON
- _SURFACE_TYPE_TRANSPARENT
m_InvalidKeywords: []
m_LightmapFlags: 4
m_EnableInstancingVariants: 0
m_DoubleSidedGI: 0
m_CustomRenderQueue: 3000
stringTagMap:
RenderType: Transparent
disabledShaderPasses:
- MOTIONVECTORS
- DepthOnly
- SHADOWCASTER
m_LockedProperties:
m_SavedProperties:
serializedVersion: 3
m_TexEnvs:
- _BaseMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _BumpMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _DetailAlbedoMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _DetailMask:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _DetailNormalMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _EmissionMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _MainTex:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _MetallicGlossMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _OcclusionMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _ParallaxMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _SpecGlossMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- unity_Lightmaps:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- unity_LightmapsInd:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- unity_ShadowMasks:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
m_Ints: []
m_Floats:
- _AddPrecomputedVelocity: 0
- _AlphaClip: 0
- _AlphaToMask: 0
- _Blend: 0
- _BlendModePreserveSpecular: 1
- _BumpScale: 1
- _ClearCoatMask: 0
- _ClearCoatSmoothness: 0
- _Cull: 2
- _Cutoff: 0.5
- _DetailAlbedoMapScale: 1
- _DetailNormalMapScale: 1
- _DstBlend: 10
- _DstBlendAlpha: 10
- _EnvironmentReflections: 1
- _GlossMapScale: 1
- _Glossiness: 0
- _GlossyReflections: 1
- _Metallic: 0
- _Mode: 0
- _OcclusionStrength: 1
- _Parallax: 0.02
- _QueueOffset: 0
- _ReceiveShadows: 1
- _Smoothness: 0
- _SmoothnessTextureChannel: 0
- _SpecularHighlights: 1
- _SrcBlend: 1
- _SrcBlendAlpha: 1
- _Surface: 1
- _UVSec: 0
- _WorkflowMode: 1
- _XRMotionVectorsPass: 1
- _ZWrite: 0
m_Colors:
- _BaseColor: {r: 1, g: 0, b: 0, a: 0}
- _Color: {r: 1, g: 0, b: 0, a: 0}
- _EmissionColor: {r: 0, g: 0, b: 0, a: 1}
- _SpecColor: {r: 0.19999996, g: 0.19999996, b: 0.19999996, a: 1}
m_BuildTextureStacks: []
m_AllowLocking: 1
+8
View File
@@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 42298ea83aa493b4f9615901ffc186bb
NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 2100000
userData:
assetBundleName:
assetBundleVariant:
+1 -1
View File
@@ -1 +1 @@
{"general":{"region":"cn"},"account":{"access_token":""},"package":{"package_name":"com.Unity-Technologies.VR-Template","package_version_code":1,"package_version_name":"0.1"}}
{"general":{"region":"cn"},"account":{"access_token":""},"package":{"package_name":"com.unity.skb.smd","package_version_code":1,"package_version_name":"0.1"}}
@@ -87,6 +87,7 @@ Material:
- Vector1_69b40c1ee2e1422cbfcae389f53b36a9: 1
- Vector1_8671db567d5d4784b29e8ff511bd8f1e: 1
- _AlphaClip: 0
- _AlphaToMask: 0
- _BUILTIN_AlphaClip: 0
- _BUILTIN_Blend: 0
- _BUILTIN_CullMode: 2
@@ -102,6 +103,7 @@ Material:
- _CastShadows: 1
- _Cull: 2
- _DstBlend: 10
- _DstBlendAlpha: 10
- _EdgeHighlightPower: 5
- _FadeSize: 0.02
- _FadeStart: 0.12
@@ -128,6 +130,7 @@ Material:
- _QueueOffset: 0
- _Scale: 0.16
- _SrcBlend: 5
- _SrcBlendAlpha: 1
- _Surface: 1
- _TransitionSize: 0.1
- _WristRange: 0.06
+12379 -11722
View File
File diff suppressed because it is too large. Load diff
@@ -118,6 +118,8 @@ MonoBehaviour:
instantiationMode: 0
- dependency: {fileID: 2100000, guid: 9e1261e0c9d219746a6edcfb37211100, type: 2}
instantiationMode: 0
- dependency: {fileID: 11400000, guid: 3ec238cb3e80e274c844d7b56f585392, type: 2}
instantiationMode: 1
- dependency: {fileID: 3064453622967830428, guid: 7942e6544a2b2ae48bcf988d9aed838d, type: 3}
instantiationMode: 0
- dependency: {fileID: 11400000, guid: eb00da65e3eb3ec4183cff0ee667a979, type: 2}
@@ -138,10 +140,12 @@ MonoBehaviour:
instantiationMode: 0
- dependency: {fileID: 11400000, guid: 5c5c73ead290d6441aaa736f48f64242, type: 2}
instantiationMode: 1
- dependency: {fileID: 8900000, guid: 08ea713d0e79d8e4aa41c53a0bad3fa5, type: 3}
- dependency: {fileID: 919132149155446097, guid: 71bf2e0c48a8a284dafeb34e80131d56, type: 3}
instantiationMode: 0
- dependency: {fileID: 3055433562365713971, guid: b84cd05e1160fe34cab2585022c8cd99, type: 3}
instantiationMode: 0
- dependency: {fileID: 8900000, guid: 08ea713d0e79d8e4aa41c53a0bad3fa5, type: 3}
instantiationMode: 0
- dependency: {fileID: 2800000, guid: 91d94f9a14fa1ba4f9af530abb719303, type: 3}
instantiationMode: 0
- dependency: {fileID: 2100000, guid: 19fd09f1fd9347644a27778b73938d3b, type: 2}
@@ -326,12 +330,16 @@ MonoBehaviour:
instantiationMode: 0
- dependency: {fileID: 11400000, guid: 8f586378b4e144a9851e7b34d9b748ee, type: 2}
instantiationMode: 1
- dependency: {fileID: 4922582553321831162, guid: 76f3439a0ae796e4b81bee3f91f888ee, type: 3}
instantiationMode: 0
- dependency: {fileID: 2800000, guid: a7ec9e7ad8b847b7ae4510af83c5d868, type: 3}
instantiationMode: 1
- dependency: {fileID: 8538602047018081646, guid: 629fd7882ec6bfc499a5fcf20035282b, type: 3}
instantiationMode: 0
- dependency: {fileID: 2100000, guid: 55fa12dc7870f1e46b6a7f8617949a86, type: 2}
instantiationMode: 0
- dependency: {fileID: 3774509235512974894, guid: eb9104ef66b7305468adb3697fdeed5e, type: 3}
instantiationMode: 0
- dependency: {fileID: 8900000, guid: bfb8f0735ac8c9b43a2f0251aea88e11, type: 3}
instantiationMode: 0
- dependency: {fileID: 2800000, guid: 85e675893a909864d9c237e20202651b, type: 3}
@@ -346,6 +354,8 @@ MonoBehaviour:
instantiationMode: 0
- dependency: {fileID: 11400000, guid: fc690d1505c48cb4696838b71abd2ca0, type: 2}
instantiationMode: 1
- dependency: {fileID: 2100000, guid: 42298ea83aa493b4f9615901ffc186bb, type: 2}
instantiationMode: 0
- dependency: {fileID: 2800000, guid: 1e4fbbf0f3e2efa428b2176e5a91baed, type: 3}
instantiationMode: 0
- dependency: {fileID: 8900000, guid: fe92f018ab9184b43b46c80b2a02e522, type: 3}
@@ -466,6 +476,8 @@ MonoBehaviour:
instantiationMode: 0
- dependency: {fileID: 919132149155446097, guid: a8211a3e0e87d014e8326e23ae022d39, type: 3}
instantiationMode: 0
- dependency: {fileID: 919132149155446097, guid: 7ab6f3b0fd1a6ba41b2a47766c16613f, type: 3}
instantiationMode: 0
- dependency: {fileID: 8298045291338814966, guid: 77e7c27b2c5525e4aa8cc9f99d654486, type: 3}
instantiationMode: 0
- dependency: {fileID: 2800000, guid: e6791c5867aa71c43961dc8cb20d0b98, type: 3}