I can't be the only one who thinks it's kinda weird that the only flats with collision are enemies, right?
I never liked the fact that you can pretty much walk right trough shopkeepers, townspeople, etc.
Would it be possible for someone to do a mod that adds collision to other flats? I'd try to do it myself but honestly the only thing I half-know how to do is using the quest system, and have no idea about C# coding or how the underlying engine works.
I think "terrain" flats like trees, bushes, rocks, etc. should probably stay intangible, otherwise it could be a really big headache for those of us who use Tedious Travel. But other than that and small flats like treasure piles I think it'd be cool if everything else was solid.
[Request] Collision for non-enemy flats?
-
- Posts: 371
- Joined: Sun Jun 02, 2019 4:28 pm
- Location: Colombia
[Request] Collision for non-enemy flats?
Released mods: https://www.nexusmods.com/users/5141135 ... files&BH=0
Daggerfall isn't the only ridiculously intrincate fantasy world simulator with the initials DF that I make mods for: http://www.bay12forums.com/smf/index.php?topic=177071.0
Daggerfall isn't the only ridiculously intrincate fantasy world simulator with the initials DF that I make mods for: http://www.bay12forums.com/smf/index.php?topic=177071.0
- King of Worms
- Posts: 4753
- Joined: Mon Oct 17, 2016 11:18 pm
- Location: Scourg Barrow (CZ)
- Contact:
Re: [Request] Collision for non-enemy flats?
I wrote the same post so we are two.. agreed on the nature flats not being solid.
Npcs should be solid, same as animals around the towns (cows, horses etc)
Npcs should be solid, same as animals around the towns (cows, horses etc)
DREAM Nexus https://www.nexusmods.com/users/73250038?tab=user+files
DREAM Forums viewtopic.php?f=27&t=1168
DISCORD: king_of_worms_cz
DREAM Forums viewtopic.php?f=27&t=1168
DISCORD: king_of_worms_cz
- pango
- Posts: 3359
- Joined: Wed Jul 18, 2018 6:14 pm
- Location: France
- Contact:
Re: [Request] Collision for non-enemy flats?
The short answer is, since those already have collider components, those must have their "isTrigger" flag turned off (so the colliders behave has obstacles rather than just triggers)imsobadatnicknames wrote: ↑Tue Aug 11, 2020 2:11 am Would it be possible for someone to do a mod that adds collision to other flats? I'd try to do it myself but honestly the only thing I half-know how to do is using the quest system, and have no idea about C# coding or how the underlying engine works.
Code: Select all
diff --git a/Assets/Scripts/Game/Utility/PopulationManager.cs b/Assets/Scripts/Game/Utility/PopulationManager.cs
index fa93838d1..c49dea629 100644
--- a/Assets/Scripts/Game/Utility/PopulationManager.cs
+++ b/Assets/Scripts/Game/Utility/PopulationManager.cs
@@ -263,6 +263,10 @@ namespace DaggerfallWorkshop.Game.Utility
GameObject go = GameObjectHelper.InstantiatePrefab(DaggerfallUnity.Instance.Option_MobileNPCPrefab.gameObject, mobileNPCName, dfLocation.transform, Vector3.zero);
go.SetActive(false);
+ Collider collider = go.GetComponent<Collider>();
+ if (collider)
+ collider.isTrigger = false;
+
// Get MobilePersonNPC reference
MobilePersonNPC npc = go.GetComponent<MobilePersonNPC>();
diff --git a/Assets/Scripts/Internal/DaggerfallInterior.cs b/Assets/Scripts/Internal/DaggerfallInterior.cs
index 0b956041b..084c4305a 100644
--- a/Assets/Scripts/Internal/DaggerfallInterior.cs
+++ b/Assets/Scripts/Internal/DaggerfallInterior.cs
@@ -928,6 +928,10 @@ namespace DaggerfallWorkshop
// Spawn billboard gameobject
go = GameObjectHelper.CreateDaggerfallBillboardGameObject(obj.TextureArchive, obj.TextureRecord, node.transform);
+ Collider collider = go.GetComponent<Collider>();
+ if (collider)
+ collider.isTrigger = false;
+
// Set position
DaggerfallBillboard dfBillboard = go.GetComponent<DaggerfallBillboard>();
go.transform.position = billboardPosition;
Mastodon: @pango@fosstodon.org
When a measure becomes a target, it ceases to be a good measure.
-- Charles Goodhart
When a measure becomes a target, it ceases to be a good measure.
-- Charles Goodhart