CFrame.new(Vector3 p, Vector3 right, Vector3 up[, Vector3 back])

Well yes, I’m not sure if Fractality meant literally “new” in the OP anyway. :stuck_out_tongue: It could be named anything like that, although preferably something related to how you’re passing multiple vectors/axes. “Matrix” makes it seem like you’re passing loose values.

Lol, came here to make a thread suggesting exactly this.

In particular, the API should be an exact copy of the corresponding XNA Matrix API (the parameters being “position”, “forwards” and “up”, with forwards = lookVector):

https://msdn.microsoft.com/en-us/library/bb975261.aspx

Nice timing, we’re shipping this soon (~2 weeks).

CFrame.fromMatrix(pos, vx, vy[, vz])

8 Likes

Oh, sorry, didn’t realize I bumped the thread myself… not sure what I did to get here. I’m surprised you actually ended up including the z parameter. I guess it is best for completeness since the three argument form is the vector analogue to to the full 12 argument constructor.

How does this API plan to deal with non-orthogonal inputs for vx and vy? Will it fix them, or just take what it gets? If it fixes them, which vector will keep its original direction?

Either way, this will be a nice API addition. I get tired of writing right.x, up.x, back.x, ... and I’ve typod during it more often than I’d like to admit.

It doesn’t orthonormalize.

3 Likes