generated from VR-Sexe/Unity3DTemplate
Disable Snapturn when grab
This commit is contained in:
parent
7c200b5865
commit
7fc663894c
@ -97,7 +97,7 @@ LightmapSettings:
|
||||
m_ExportTrainingData: 0
|
||||
m_TrainingDataDestination: TrainingData
|
||||
m_LightProbeSampleCountMultiplier: 4
|
||||
m_LightingDataAsset: {fileID: 112000000, guid: 452b54fcc00b0c243b1dc869278097de, type: 2}
|
||||
m_LightingDataAsset: {fileID: 112000000, guid: b0920c1f3a4585c42a14752ac957e6b1, type: 2}
|
||||
m_LightingSettings: {fileID: 4890085278179872738, guid: e0d1b39396743fc4da42f1d1948a6570, type: 2}
|
||||
--- !u!196 &4
|
||||
NavMeshSettings:
|
||||
@ -8286,7 +8286,7 @@ Mesh:
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_Name: pb_Mesh37220
|
||||
m_Name: pb_Mesh23932
|
||||
serializedVersion: 10
|
||||
m_SubMeshes:
|
||||
- serializedVersion: 2
|
||||
@ -11930,7 +11930,7 @@ Mesh:
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_Name: pb_Mesh37160
|
||||
m_Name: pb_Mesh23872
|
||||
serializedVersion: 10
|
||||
m_SubMeshes:
|
||||
- serializedVersion: 2
|
||||
|
||||
BIN
Assets/Scenes/FabLab/FabLab/ReflectionProbe-0.png
(Stored with Git LFS)
BIN
Assets/Scenes/FabLab/FabLab/ReflectionProbe-0.png
(Stored with Git LFS)
Binary file not shown.
@ -101,30 +101,6 @@ TextureImporter:
|
||||
overridden: 0
|
||||
androidETC2FallbackOverride: 0
|
||||
forceMaximumCompressionQuality_BC6H_BC7: 0
|
||||
- serializedVersion: 3
|
||||
buildTarget: Android
|
||||
maxTextureSize: 2048
|
||||
resizeAlgorithm: 0
|
||||
textureFormat: -1
|
||||
textureCompression: 1
|
||||
compressionQuality: 50
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 0
|
||||
androidETC2FallbackOverride: 0
|
||||
forceMaximumCompressionQuality_BC6H_BC7: 0
|
||||
- serializedVersion: 3
|
||||
buildTarget: WebGL
|
||||
maxTextureSize: 2048
|
||||
resizeAlgorithm: 0
|
||||
textureFormat: -1
|
||||
textureCompression: 1
|
||||
compressionQuality: 50
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 0
|
||||
androidETC2FallbackOverride: 0
|
||||
forceMaximumCompressionQuality_BC6H_BC7: 0
|
||||
spriteSheet:
|
||||
serializedVersion: 2
|
||||
sprites: []
|
||||
|
||||
@ -100,14 +100,14 @@ public class Catalog : MonoBehaviour
|
||||
furrnitureBall.transform.localScale *= rescale;
|
||||
furrnitureBall.transform.localPosition = Vector3.down * 0.2f;
|
||||
sphere.SetActive(true);
|
||||
hand.GetGrabStarting
|
||||
//hand.GetGrabStarting
|
||||
hand.AttachObject(sphere, GrabTypes.Trigger);
|
||||
currentSphere = sphere;
|
||||
}
|
||||
|
||||
public void ReleaseObject(GameObject furniture, Valve.VR.InteractionSystem.Hand hand)
|
||||
{
|
||||
hand.DetachObject(currentSphere);
|
||||
hand.DetachObject(currentSphere);
|
||||
currentSphere = null;
|
||||
|
||||
}
|
||||
|
||||
@ -21,6 +21,19 @@ public class FurnitureMover : MonoBehaviour
|
||||
public Color color;
|
||||
public float thickness = 0.002f;
|
||||
public Color clickColor = Color.green;
|
||||
|
||||
private SnapTurn _snapturn;
|
||||
private SnapTurn snapturn
|
||||
{
|
||||
get
|
||||
{
|
||||
if (_snapturn == null)
|
||||
{
|
||||
_snapturn = Player.instance.GetComponentInChildren<SnapTurn>();
|
||||
}
|
||||
return _snapturn;
|
||||
}
|
||||
}
|
||||
private void Start()
|
||||
{
|
||||
if (pose == null)
|
||||
@ -144,21 +157,33 @@ public class FurnitureMover : MonoBehaviour
|
||||
return;
|
||||
}
|
||||
clickHandler.OnPointerClickDown();
|
||||
Grabbing = clickHandler.parent;
|
||||
SetGrabbing(clickHandler.parent);
|
||||
GrabFurniture(Grabbing.gameObject);
|
||||
/*Grabbing.transform.SetParent(this.transform);*/
|
||||
}
|
||||
|
||||
private void OnPointerClickUp(object sender, PointerEventArgs e)
|
||||
|
||||
public void SetGrabbing(MovableFurniture furniture)
|
||||
{
|
||||
if(Grabbing != null)
|
||||
Grabbing = furniture;
|
||||
snapturn.enabled = false;
|
||||
}
|
||||
|
||||
public void StopGrabbing()
|
||||
{
|
||||
if (Grabbing != null)
|
||||
{
|
||||
Grabbing.OnPointerClickUp();
|
||||
/*Grabbing.transform.SetParent(this.transform.root);*/
|
||||
Grabbing = null;
|
||||
snapturn.enabled = true;
|
||||
}
|
||||
}
|
||||
|
||||
private void OnPointerClickUp(object sender, PointerEventArgs e)
|
||||
{
|
||||
StopGrabbing();
|
||||
}
|
||||
|
||||
private void OnPointerOut(object sender, PointerEventArgs e)
|
||||
{
|
||||
MovableFurniturePart pointerExitHandler = e.target.GetComponent<MovableFurniturePart>();
|
||||
|
||||
Loading…
Reference in New Issue
Block a user