Either I’m having a hard time understanding Babylon’s axes setup, specifically as it relates to ArcRotateCamera, or the API is unclear.
See the above playground. My goal is a rectangular ground, kind of like a soccer field, and I’m trying to line the field. Am I right in assuming that red is x, green is y, and and blue is z, by default?
I want the default view to be top-down (to start) and looking at the field horizontally. However, setting the alpha and beta to 0, 0 (like it seems to indicate in the docs) puts the “width” of the field “vertically” in the camera, and the “height” of the field “horizontally”. That’s my first issue.
Then I try to move the ball on the positive x axis, which I would assume should move the ball to the right, but instead it moves down.
Then I try to make a ribbon (my field lines, eventually), and when i try to make it from x=-2 to x=2 it stretches “vertically” rather than "horizontally, and is pointed at what seems to be the z direction (which I would expect to be “up”. If I also want the ribbon to lie 1 unit to the “right” I seem to have to use the Z axis.
Then in my own project, putting ribbons to the “left” side of the field or the “back sideline” of the field ended up having to use several different variations of the “directions” option…? I would understand if I had my “up” wrong and had to orient them all “up”, but having to trial and error different vector facings was driving me crazy.
I tried messing with some different values of alpha, beta and upVector based on this playground, but I honestly just got more confused.
That’s all to say I’m pretty sure I’m missing something fundamental about Babylon’s axis system or the API because after like 3 hours of banging my head, I only had lined about half of the field and gave up in frustration. Anyone have an idea what I’m doing wrong?? Many thanks in advance.