How do you use Axes.new()?

I’m attempting to allow users of my game to choose which Axis they want to be able to turn with ArcHandles, but I’m having problems with the ArcHandles.Axes property. The page has little to no documentation on how to use it and searching “Axis.new” in the DevForum search bar gave me a few results, none of which gave me the answer as to how to use them. I looked on the Axes documentation to see how to format a Axes.new() value, but all it says is its a tuple of axes, which makes no sense.

It says the axes values in the tuple are bool values, so would I write it like this

ArcHandles.Axes = Axes.new(true, false, false)

, or

ArcHandles.Axes = Axes.new(Axis.X = true, Axis.Y = false, Axis.Z = false)

or some complete other way?

There should be more information online that would make this property easier to use for devs.

Bumping this, I would also like some clarification on how to use Axes.new().

1 Like

Actually, after some fairly quick testing, I’ve figured out how to use Axes.new().

There is an Enum called Enum.NormalId, and it has 6 values (Front, Back, Left, Right, Top, & Bottom)

When setting ArcHandles.Axes to Axes.new(), it erases all Axes’…

Image

image

When setting ArcHandles.Axes to Axes.new(Enum.NormalId.Front), it only enables the front

Image

image

When setting ArcHandles.Axes to Axes.new(Enum.NormalId.Left), it only enables the left

Image

image

When setting ArcHandles.Axes to Axes.new(Enum.NormalId.Top), it only enables the top

Image

image

…and so on.

When three different & unique NormalIds (or all 6) are combined in Axes.new() it recreates the original ArcHandles, with all three Axes.

Axes.X returns true if it has either an Enum.NormalId.Left or Enum.NormalId.Right defined in the constructor.
Axes.Y returns true if it has either an Enum.NormalId.Top or Enum.NormalId.Bottom defined in the constructor.
Axes.Z returns true if it has either an Enum.NormalId.Front or Enum.NormalId.Back defined in the constructor.

4 Likes

Interesting, thank you! :happy1:

1 Like