From 77fc43bebd7b2322e5e7a762f56fdb0310807933 Mon Sep 17 00:00:00 2001 From: henrisel Date: Tue, 27 Jan 2026 17:50:13 +0200 Subject: [PATCH] fix bug with player colliding with spawned model when holding it --- 3d-generation-pipeline/README.md | 7 +++-- .../Characters/BillboardNPC.prefab | 28 ++++++++++++++++++- .../_PROJECT/Scenes/DeltaBuilding_base.unity | 4 +-- .../ShapeDetectionMinigameController.cs | 6 ++-- 4 files changed, 36 insertions(+), 9 deletions(-) diff --git a/3d-generation-pipeline/README.md b/3d-generation-pipeline/README.md index 31810bee..42768817 100644 --- a/3d-generation-pipeline/README.md +++ b/3d-generation-pipeline/README.md @@ -1,9 +1,6 @@ ### TODO -* glTF loading: vahetada ära shader Universal render pipelin Lit, mitte panna buildi kaasa glTf oma * user flow: grab item? mida krabada -* user prefs: settinguid meelde jätta * võtta spawnitud mudeli mõõtmed: meshcollideri max x, max y, etc? bounding box? -* mängija collide'ib spawnitud mudeliga - ei tohiks * shape scanner: * initialisation correct number of confs * mitte-liigutatavaks, aga samal ajal kõrgus dünaamiliselt õige. või lihtsalt piisavalt madalale asetada või väljaulatuv kang millest krabada @@ -24,6 +21,10 @@ * klaas on näha temast eespool * pööramine kaamera poole - sujuvalt (slerp) +Can't/Won't Do: +* glTF loading: vahetada ära shader Universal render pipelin Lit, mitte panna buildi kaasa glTf oma - **ei saa, objekt on siis ilma tekstuurita, lihtsalt hall** +* user prefs: settinguid meelde jätta - **juba sain continuous movementi sisse lülitada by default, rohkem pole vaja** + ### Notes * TRELLIS: added functionality to specify texture baking optimisation total steps as an argument (`texture_opt_total_steps`), to replace the hardcoded 2500. But this is not tracked in Git (because modified this https://github.com/IgorAherne/trellis-stable-projectorz/releases/tag/latest) diff --git a/Assets/_PROJECT/Prefabs/ModelGeneration/Characters/BillboardNPC.prefab b/Assets/_PROJECT/Prefabs/ModelGeneration/Characters/BillboardNPC.prefab index 55586dd7..92aea602 100644 --- a/Assets/_PROJECT/Prefabs/ModelGeneration/Characters/BillboardNPC.prefab +++ b/Assets/_PROJECT/Prefabs/ModelGeneration/Characters/BillboardNPC.prefab @@ -90,6 +90,7 @@ GameObject: - component: {fileID: 584286906844083765} - component: {fileID: 6105090838799004608} - component: {fileID: 6238040606326453210} + - component: {fileID: 7699707098595015193} - component: {fileID: 1155083335105893391} - component: {fileID: 1413215456818694348} - component: {fileID: 483845010817450077} @@ -165,7 +166,7 @@ MonoBehaviour: m_FallbackScreenDPI: 96 m_DefaultSpriteDPI: 96 m_DynamicPixelsPerUnit: 1 - m_PresetInfoIsWorld: 0 + m_PresetInfoIsWorld: 1 --- !u!114 &6105090838799004608 MonoBehaviour: m_ObjectHideFlags: 0 @@ -198,6 +199,31 @@ MonoBehaviour: mouthTransform: {fileID: 5759406807219530703} mouthScalingMultiplier: 2.5 mouthMovementDuration: 0.25 + voiceLineKeys: [] +--- !u!114 &7699707098595015193 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 4663194936290788516} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 6c6205a218222364ca440c740b7a6b8f, type: 3} + m_Name: + m_EditorClassIdentifier: + SelectAudio: + Guid: + Data1: 0 + Data2: 0 + Data3: 0 + Data4: 0 + Path: + SoundOcclusionWidening: 1 + PlayerOcclusionWidening: 1 + OcclusionLayer: + serializedVersion: 2 + m_Bits: 0 --- !u!135 &1155083335105893391 SphereCollider: m_ObjectHideFlags: 0 diff --git a/Assets/_PROJECT/Scenes/DeltaBuilding_base.unity b/Assets/_PROJECT/Scenes/DeltaBuilding_base.unity index 0a4353b2..6e700227 100644 --- a/Assets/_PROJECT/Scenes/DeltaBuilding_base.unity +++ b/Assets/_PROJECT/Scenes/DeltaBuilding_base.unity @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:8e7134ad843bfc1613a90ca39e080ecc196866573586f6f6df67e273636d03aa -size 67905956 +oid sha256:575d75cee8477fd57b91ac07ccfc31b42b7befad969e8bfc8f75da3456222a57 +size 67905988 diff --git a/Assets/_PROJECT/Scripts/ModeGeneration/ShapeDetection/ShapeDetectionMinigameController.cs b/Assets/_PROJECT/Scripts/ModeGeneration/ShapeDetection/ShapeDetectionMinigameController.cs index 78358aaa..5e37e154 100644 --- a/Assets/_PROJECT/Scripts/ModeGeneration/ShapeDetection/ShapeDetectionMinigameController.cs +++ b/Assets/_PROJECT/Scripts/ModeGeneration/ShapeDetection/ShapeDetectionMinigameController.cs @@ -1,9 +1,6 @@ -using FishNet.Component.Transforming; -using FishNet.Object; using System; using UnityEngine; using UnityEngine.UI; -using UnityEngine.XR.Interaction.Toolkit; public class ShapeDetectionMinigameController : MonoBehaviour { @@ -16,6 +13,7 @@ public class ShapeDetectionMinigameController : MonoBehaviour public GameObject GeneratedModel { get; private set; } public Transform modelSpawnPoint; public string shapeScannerTag = "ShapeScannable"; + public int ignorePlayerCollisionLayer = 2; private bool modelGenerationInProgress; @@ -70,6 +68,7 @@ public class ShapeDetectionMinigameController : MonoBehaviour GameObject spawnedObjectParent = new GameObject("SpawnedModelParent"); spawnedObjectParent.transform.parent = modelSpawnPoint; spawnedObjectParent.transform.position = modelSpawnPoint.transform.position; + spawnedObjectParent.layer = ignorePlayerCollisionLayer; Rigidbody rigidbody = spawnedObjectParent.AddComponent(); rigidbody.isKinematic = true; @@ -81,6 +80,7 @@ public class ShapeDetectionMinigameController : MonoBehaviour spawnedObject.transform.parent = spawnedObjectParent.transform; spawnedObject.transform.position = spawnedObjectParent.transform.position; spawnedObject.tag = shapeScannerTag; + spawnedObject.layer = ignorePlayerCollisionLayer; spawnedObjectParent.AddComponent(); }