forked from cgvr/DeltaVR
shape scanner emits particles on config complete
This commit is contained in:
@@ -2,6 +2,7 @@
|
|||||||
* korralik teleportation minigame'idesse, kasutades TeleportProviderit, nagu button
|
* korralik teleportation minigame'idesse, kasutades TeleportProviderit, nagu button
|
||||||
* quest marker peaks jätma nähtavad noolekesed enda liikumise teele
|
* quest marker peaks jätma nähtavad noolekesed enda liikumise teele
|
||||||
* teha build kus archery range'is spawnitud objektid
|
* teha build kus archery range'is spawnitud objektid
|
||||||
|
* fix FMOD ChannelControl errors
|
||||||
* Unity crash after stopping the game - most likely due to FMOD trying to do something with invalid audio instances
|
* Unity crash after stopping the game - most likely due to FMOD trying to do something with invalid audio instances
|
||||||
* speech-to-text:
|
* speech-to-text:
|
||||||
* uurida miks buildis Whisper halvemini töötab
|
* uurida miks buildis Whisper halvemini töötab
|
||||||
@@ -13,14 +14,14 @@
|
|||||||
* professor võiks öelda "good job, continue..." pärast esimest successi
|
* professor võiks öelda "good job, continue..." pärast esimest successi
|
||||||
* kui kõik configurationid tehtud, siis professor ütleb "thank you"
|
* kui kõik configurationid tehtud, siis professor ütleb "thank you"
|
||||||
* particle effectid 3d printerile
|
* particle effectid 3d printerile
|
||||||
* particle effectid shape scannerile, kui config success
|
|
||||||
* peab mängijale kuidagi selgitama, kuidas scale'ida prinditud objekte
|
* peab mängijale kuidagi selgitama, kuidas scale'ida prinditud objekte
|
||||||
* prinditud objekti scale'imisele min ja max size limiit
|
* prinditud objekti scale'imisele min ja max size limiit
|
||||||
* archery range:
|
* archery range:
|
||||||
* võiks jääda kordama viimast instruktsiooni, kui mängija ei progressi edasi
|
* võiks jääda kordama viimast instruktsiooni, kui mängija ei progressi edasi
|
||||||
* kui archery range läbi, võiks npc öelda "good job, try again..."
|
* kui archery range läbi, võiks npc öelda "good job, try again..."
|
||||||
* particle effectid model display'le
|
* particle effectid model display'le
|
||||||
* cafe:
|
* cafe:
|
||||||
|
* võiks saada hinnata saadud tellimust
|
||||||
* npc võiks olla keeratud sinu poole juba kaugelt
|
* npc võiks olla keeratud sinu poole juba kaugelt
|
||||||
|
|
||||||
Can't/Won't Do:
|
Can't/Won't Do:
|
||||||
|
|||||||
@@ -84,7 +84,7 @@ namespace _PROJECT.Multiplayer.NewBow
|
|||||||
|
|
||||||
public void SetLaunchDirection(Vector3 direction)
|
public void SetLaunchDirection(Vector3 direction)
|
||||||
{
|
{
|
||||||
Debug.Log("Setting launch direction: " + direction);
|
// Debug.Log("Setting launch direction: " + direction);
|
||||||
if (direction != Vector3.zero)
|
if (direction != Vector3.zero)
|
||||||
{
|
{
|
||||||
_networkBehavior.SetLaunchDirection(direction);
|
_networkBehavior.SetLaunchDirection(direction);
|
||||||
|
|||||||
Binary file not shown.
File diff suppressed because it is too large
Load Diff
Binary file not shown.
@@ -46,6 +46,7 @@ public class ShapeScanner : MonoBehaviour
|
|||||||
public Transform rayParent;
|
public Transform rayParent;
|
||||||
public TextMeshProUGUI currentConfigurationDisplay;
|
public TextMeshProUGUI currentConfigurationDisplay;
|
||||||
public TextMeshProUGUI correctPercentageDisplay;
|
public TextMeshProUGUI correctPercentageDisplay;
|
||||||
|
public ParticleSystem particles;
|
||||||
public XRInteractionManager interactionManager;
|
public XRInteractionManager interactionManager;
|
||||||
|
|
||||||
[Header("Materials")]
|
[Header("Materials")]
|
||||||
@@ -134,7 +135,7 @@ public class ShapeScanner : MonoBehaviour
|
|||||||
UpdateDisplay(calculateCorrectPercentage());
|
UpdateDisplay(calculateCorrectPercentage());
|
||||||
}
|
}
|
||||||
|
|
||||||
private void DestroyCollidingObjects()
|
private void OnConfigurationComplete()
|
||||||
{
|
{
|
||||||
HashSet<GameObject> allCollidingObjects = new HashSet<GameObject>();
|
HashSet<GameObject> allCollidingObjects = new HashSet<GameObject>();
|
||||||
foreach (ShapeScannerRay ray in existingRays)
|
foreach (ShapeScannerRay ray in existingRays)
|
||||||
@@ -157,6 +158,10 @@ public class ShapeScanner : MonoBehaviour
|
|||||||
collidingObject.transform.position = Vector3.zero;
|
collidingObject.transform.position = Vector3.zero;
|
||||||
Destroy(collidingObject);
|
Destroy(collidingObject);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
AudioManager.Instance.PlayAttachedInstance(FMODEvents.Instance.ShapeScannerSuccess, gameObject);
|
||||||
|
if (!particles.isPlaying) particles.Play();
|
||||||
|
particles.Emit(100);
|
||||||
}
|
}
|
||||||
|
|
||||||
private float calculateCorrectPercentage()
|
private float calculateCorrectPercentage()
|
||||||
@@ -176,16 +181,13 @@ public class ShapeScanner : MonoBehaviour
|
|||||||
if (correctPercentage >= configurations[currentConfiguration].requiredCorrectPercentage)
|
if (correctPercentage >= configurations[currentConfiguration].requiredCorrectPercentage)
|
||||||
{
|
{
|
||||||
UpdateCurrentConfigurationDisplay(currentConfiguration + 1);
|
UpdateCurrentConfigurationDisplay(currentConfiguration + 1);
|
||||||
|
OnConfigurationComplete();
|
||||||
if (currentConfiguration + 1 < configurations.Count)
|
if (currentConfiguration + 1 < configurations.Count)
|
||||||
{
|
{
|
||||||
AudioManager.Instance.PlayAttachedInstance(FMODEvents.Instance.ShapeScannerSuccess, gameObject);
|
|
||||||
DestroyCollidingObjects();
|
|
||||||
currentConfiguration++;
|
currentConfiguration++;
|
||||||
InitializeConfiguration(configurations[currentConfiguration]);
|
InitializeConfiguration(configurations[currentConfiguration]);
|
||||||
} else
|
} else
|
||||||
{
|
{
|
||||||
AudioManager.Instance.PlayAttachedInstance(FMODEvents.Instance.ShapeScannerSuccess, gameObject);
|
|
||||||
DestroyCollidingObjects();
|
|
||||||
// Initialize configuration with all rays requiring collision
|
// Initialize configuration with all rays requiring collision
|
||||||
List<BoolRow> rows = Enumerable.Repeat(new BoolRow(Enumerable.Repeat(false, 6).ToList()), 6).ToList();
|
List<BoolRow> rows = Enumerable.Repeat(new BoolRow(Enumerable.Repeat(false, 6).ToList()), 6).ToList();
|
||||||
ShapeScannerConfiguration configuration = new ShapeScannerConfiguration(6, 100, rows);
|
ShapeScannerConfiguration configuration = new ShapeScannerConfiguration(6, 100, rows);
|
||||||
|
|||||||
@@ -74,7 +74,6 @@ public class TwoHandScaleGrabInteractable : XRGrabInteractable
|
|||||||
return;
|
return;
|
||||||
|
|
||||||
float ratio = current / initialHandsDistance;
|
float ratio = current / initialHandsDistance;
|
||||||
Debug.Log("distance ratio: " + ratio);
|
|
||||||
|
|
||||||
Vector3 desired = initialScale * ratio;
|
Vector3 desired = initialScale * ratio;
|
||||||
float uniform = Mathf.Clamp(desired.x, minScale, maxScale);
|
float uniform = Mathf.Clamp(desired.x, minScale, maxScale);
|
||||||
|
|||||||
@@ -1 +1 @@
|
|||||||
{"HighScore":1.0}
|
{"HighScore":340.0}
|
||||||
Reference in New Issue
Block a user