Vector3 rotation

This is neat how he used the Vector3.forward.

I paused the video and tried Vector3.reverse for the other direction and that didn’t work, so then I tried Vector3.back and that worked.

In the video, he showed us how to use -Vector3.forward to reverse the rotation.

Just a different way to do things. I tried something in the challenge and figured out another solution, that’s all.

This is what I ended up doing as well, so far no issues

1 Like

I think, on a very basic level, the biggest difference is that one way or the other, the computer may need to perform an additional calculation. That means one method is slightly more performant than the other, but for what we’re doing, it’s negligible.

If we were making a AAA game with many of these calculations, then rooting them all out could, overall, derive a significant performance gain, but at this point it really doesn’t matter.

There’s plenty of time to learn the basics, and come back to refactor for performance later.

First we just need to make it work at all, then after it works, then we can be concerned with performance.

I wrote a little bit about this here:

1 Like

I believe I read this last week or so when I took that lesson again. It’s very good reading, and part of what I wrote was based on what you wrote in that link.

I didn’t want to go too in depth though because to be honest, I’ve spent a lot more time in networking world lately (passing my Network+ and studying for my CCNA) and my programming skills are much weaker now.

1 Like

Privacy & Terms