I am currently working with the raycast extension provided here (
http://community.stencyl.com/index.php/topic,16734.0.html), and so far it is returning the values I need from it (the x and y coordinates of the first object it hits). However, I am unable to properly access these values from the list it creates.
Here is an example of the raycast making contact with a tile:
Source/scripts/ActorEvents_14.hx:465: [B2Fixture,[Actor 100000000,Terrain],491.692307692308,256,0,10,0.692307692307692]
This is what it prints out when it makes contact with multiple tiles/actors:
Source/scripts/ActorEvents_14.hx:239: [[B2Fixture,[Actor 30,Corner Detection],576.5,896,10,0,0.559587471352177],[B2Fixture,[Actor 0,LoadParkourTest],9.99999999999998,896,10,0,0.992360580595875],[B2Fixture,[Actor 0,LoadParkourTest],9.99999999999998,896,10,0,0.992360580595875],[B2Fixture,[Actor 100000000,Terrain],896,896,10,0,0.315508021390374],[B2Fixture,[Actor 100000000,Terrain],576,896,10,0,0.559969442322384]]
And here is the readme portion for the block I am using:
3. "ray cast" returns a list of raycast results, in order of first hit to last hit. Each result is its own list containing:
0. The B2Fixture hit.
1. The actor the fixture belongs to.
2. The x of the collision.
3. The y of the collision.
4. The x normal of the collision.
5. The y normal of the collision.
6. The fraction along the line at which the collision occurred.
From what I can tell, it is nesting lists inside each other. How would I pull data from a list inside an existing list instead of just pulling an entire list and having it return null/unusable values?