Closed vickyconcarne closed 1 month ago
Looks great, will do a deep review tonight
Btw j'arrive pas à run la scène je lance le game et ça log ça
NullReferenceException: Object reference not set to an instance of an object
DesirePaths.PlayerHealth.UpdateLifeVisuals (System.Single currentValue) (at Assets/Scripts/Controller/PlayerHealth.cs:202)
DesirePaths.PlayerHealth.CheckSafe () (at Assets/Scripts/Controller/PlayerHealth.cs:133)
DesirePaths.PlayerHealth.Update () (at Assets/Scripts/Controller/PlayerHealth.cs:84)
Le chara reste à la tpose du début
Je me permet de push la deletion de fichier qui s'opère lors du lancement d'unity
outdated, closing
Description of new system
One Spline Container generates multiple splines (_SplineContainer.Splines) Player connects to a spline with a detection test iterating through all the splines, we keep track of the last spline we were on (still referenced when we leave it) - check GutsProximity.cs WARNING: this is not the most optimal solution. Since every frame, we iterate through every spline and use costly distance calculations to determine nearest point. This is because Spline Package doesn't have an innate method to check closest spline in a spline container, only the closest point to the Player transform in a Spline!!! If there are other methods, i'd be glad to hear them out - or we can test later on how performance holds up with 100s of splines.
When we leave it we index closest point from spline container's spline we were at - thats our initial point for the next spline we generate, so that they connect. And the last point is cadaver position in local space of spline
Connexions aren't the prettiest because of floating point innacuracies. But in gameplay it works and it'll look better with render texture paths superimposed onto the terrain.
If the number of splines generated is 0. Then we take _gutsOrigin as the starting point of the next spline (the first totem or new totem - idk how the pillar system works to update the spawn origin so maybe expect a bug in that respect if we die after a cinematic).
HOW DO WE CREATE A SPLINE PATH THAT BRANCHES OUT?
When we leave a guts path, index a new point every _timeBetweenPoints to a list "_droppedPoints" as long as we are not attached. On connexion with a spline in guts proximity we call ReinitializePoints() and clear the list, because we are safe again or onSafeSpace. Thus, we only create splines when we branch out.
-Modifier playerSpawn, GameManager, CadaverGutsManager and GutsProximity to reflect new guts system -Added bloom to post processing stack
-Guts Proximity is now on separate object for ease of access in hierarchy -Added singleton pattern to game manager for ease of access in scripts -Added guts layer in case we want to add collision -Changed spline material and size to look more like a path once we get render textures up and running -Changed splineContainer to have multiple splines -Guts proximity now checks against every spline created to find out if one is in range of player. -Also checks when we're connected or not to drop points or not for next spline to create accurate path.