I'm trying to produce an endless runner based in part on the template that ships with C2. However, rather than using tilemaps to generate platforms with randomised width and height, I'm using a pre-defined set of platforms with specific widths and heights in a family. The idea is that I can hand paint each specific platform later on, add it to my project and then simply include it in the family so that the code with take the properties of these into account.
However, I'm having trouble getting the platforms to spawn with the desired height and space between them. I've messed around with all of the static values and have a generally good understanding of what everything does but I'm a bit lost as to how to get these platforms to spawn so that the bottom of them is flush with the bottom of the layout and the distance is somewhere between the width of the player sprite and their maximum jump distance.
Ideally, I'd like the platforms to be arranged similarly to the autorunner template. I think that the height issue might be related to the way that Families are referenced? For example, if I reference that the platforms should spawn at LayoutHeight - platforms.Height, I assume that it was take the median height of all platforms in the family rather than pick the one that was spawned in the same action?
I've uploaded the .capx at the following link, if anyone is able to help me out or suggest an easier or better way to handle this, then that would be much appreciated! I can provide any other information if that would be helpful.
https://www.dropbox.com/s/q6o5s8tpl93jdks/RunnerTest.capx?dl=0