What can I do to help me practice with CFrames and calculate things

Please tell me if I am on the wrong topic and if I should change it.

You know when you have a script that moves something or just sounds complicated? Or you wonder “Why are they Multiplying this?” or just all of these numbers and rads and multiplying and dividing, it just is so complicated for me, and I was wondering what could I do to have a better understanding of these things.

1 Like

Don’t worry, CFrames act a little weird. Here’s what you need to know:

  • CFrame + Vector3 = CFrame with a position offset
  • CFrame * CFrame = Same as adding CFrames

You can’t add CFrames together with ‘+’. You have to use ‘*’ to add them together.

1 Like

This should go under scripting support.

1 Like

The more experience you build up with these concepts, the easier they will come to you. It is quite confusing at first.

1 Like

To gain an intuitive grasp on how CFrame works you will need to understand different mathematics from fields including algebra, trigonometry, vector & matrix analysis, and linear algebra. CFrame really isn’t some unique thing that Roblox created; it just represents a 4x4 matrix that governs how data is positioned and oriented in the three-dimensional space. This idea of the 4x4 matrix is used in many other softwares.

If you are unfamiliar with vectors and matrices you will need to learn them in depth. For algebra and trigonometry it will really just take a lot of practice to become familiar with. And lastly, linear algebra will probably be a bit tougher for most people since it is considered a higher level math topic. 3blue1brown has a great series for it that you can watch multiple times, but don’t stop there (use other sources too).

If you have a specific question that would be better but just know it’s going to take some time to really understand it. Trying to rush learn it will not be beneficial.

1 Like

You don’t really need to know what matrixes are or how to use them if you want to use CFrames though. Knowing that can give you some extra insights when using CFrames, but I wouldn’t personally recommend going too heavy into the math unless you are personally interested.

1 Like

True you could just use it without knowing what you are doing, but if you want to actually understand not only what you are doing but how to come up with ways to do stuff regarding CFrame then it’s a good idea to learn the math behind it.

If you don’t want to go heavy into the math then all I can say is you will just have to memorize different ways to do stuff which really isn’t that beneficial.

3 Likes

OP if I were you I’d skip the linear algebra course and go straight to tutorials specifically on CFrames and how you can use them for game dev. There’s lots of resources out there, e.g.

https://developer.roblox.com/en-us/articles/Understanding-CFrame

As for how to practice this, try making a “tycoon placement system” that will let you place buildings on surfaces even if they’re rotated in weird ways. If you can do that, you’re sure to have a good understanding of how and when converting between different coordinate systems / “view points” / “object spaces” can help you get the result you want.

3 Likes