A couple concerns

1 - When adding to the observers in both Start() methods, and also calling the delegates in CameraRaycaster.Start(), only the delgate from CameraRayCaster would actually run. I think that Start() method was finishing before the one on CursorAffordance was even running. Calling the delegates from Update() instead ensured that it was working properly.

2 - As this video ends, the cursors will update themselves when going back and forth between walk/attack, but not when hitting the background. I added this code as well.

		// Otherwise return background hit
		thisRaycastHit.distance = distanceToBackground;
		if (thisLayerHit != Layer.RaycastEndStop) {
			thisLayerHit = Layer.RaycastEndStop;
			layerChangeObservers (); // call the delegates
		}
4 Likes

This background layer issue is good to bring up, I was wondering how to handle that without too much ugly extra code.

Privacy & Terms