HolographicWings / LethalSDK-Unity-Project

Unity Project using Lethal Company SDK
MIT License
42 stars 4 forks source link

Cannot change where the ship lands in a custom moon #24

Open Dynrothe opened 7 months ago

Dynrothe commented 7 months ago

I for the life of me cannot change where the ship lands in a custom moon. No matter what I change, lock position script, navmesh etc, it always lands on the same spot.

How do you actually decide where it lands?

HolographicWings commented 7 months ago

I for the life of me cannot change where the ship lands in a custom moon. No matter what I change, lock position script, navmesh etc, it always lands on the same spot.

How do you actually decide where it lands?

Because you just can't, the ship always spawn in same coordinates in every vanilla map, it's why i added a lock position script ^^" move the entire map instead

Xaymar commented 6 months ago

Not sure if I missed this in the readme, but it'd be nice to be in there, instead of having to figure it out after already designing a map. Now to figure out how to rotate terrain, if that's even possible in this old version of Unity.

HolographicWings commented 6 months ago

Not sure if I missed this in the readme, but it'd be nice to be in there, instead of having to figure it out after already designing a map. Now to figure out how to rotate terrain, if that's even possible in this old version of Unity.

Terrain is just an object in the scene, you can't rotate it ? This is not an old version btw Oo

Xaymar commented 6 months ago

Terrain is just an object in the scene, you can't rotate it ?

No, if you rotate the terrain in the prefab, it will just move it weirdly. No rotation is actually applied at all, so the result is just odd offsets to the original position.

This is not an old version btw Oo

Considering that the latest 2022.3.x version is 2022.3.16f1, yes 2022.3.9 is old. Most of my Unity addons don't work in this specific version, but happily work in 2022.3.15 and 2022.3.16 for unknown reasons. I can still work with it, I just have to switch back and forth between Blender and Unity.

Edit:

the ship always spawn in same coordinates in every vanilla map

Not entirely sure if this correct, but it is a current limitation until someone figured out how the game itself manages to move the ship location. Three maps (Offense, Dine, March) place the ship at a completely different location than the usual (0,0,0). I'm still decompiling the game itself, so I don't know how it does this yet.

HolographicWings commented 6 months ago

Terrain is just an object in the scene, you can't rotate it ?

No, if you rotate the terrain in the prefab, it will just move it weirdly. No rotation is actually applied at all, so the result is just odd offsets to the original position.

You are supposed to edit your moon in the SceneBuilder scene, not in the prefab, it's better to edit the nav mesh later And you are right my bad, the terrain can't be rotated in the regular way You can try this : https://assetstore.unity.com/packages/tools/terrain/terrain-rotator-21303 It's an old script but it may work without too much code fixes

This is not an old version btw Oo

Considering that the latest 2022.3.x version is 2022.3.16f1, yes 2022.3.9 is old. Most of my Unity addons don't work in this specific version, but happily work in 2022.3.15 and 2022.3.16 for unknown reasons. I can still work with it, I just have to switch back and forth between Blender and Unity.

I mean 2022.x is not old compared to when some games requires 2018-2021 to be modded

the ship always spawn in same coordinates in every vanilla map

Not entirely sure if this correct, but it is a current limitation until someone figured out how the game itself manages to move the ship location. Three maps (Offense, Dine, March) place the ship at a completely different location than the usual (0,0,0). I'm still decompiling the game itself, so I don't know how it does this yet.

You can check, it's hard coded in the animation clip of the ship landing The ship always lands on the same coordinates

Xaymar commented 6 months ago

The ship always lands on the same coordinates

Ah you're right. The position offsets they add is (mostly) negated by the entire environment being rotated 180° and moved back in the same direction. So on those maps the navmesh is slightly off.