Using getOrientation?

First of all, I know that many people have posted about this topic. I’ve already done a bunch of searching, and nothing really helped.

I need to know how to use the getOrientation command in the BGE.
Unfortunately, I am only a sophomore in high school (10th grade) and I have not learned trigonometry yet (although my dad gave me a quick overview).

I need to be able to know how to use getOrientation in a more practical sense… I just need to know how I can use it. (More specifically, I need to use it to find a camera’s orientation so that the movement of a ball is dependant on the camera’s view, not the global coordinates or the ball’s local coordinates.

All of the things I have found on Google were over my head (although I think I get the idea). :spin:

I would like someone (please!) to help me understand how I could use this. Just a few examples of scripts that use it, or something that can translate the 3x3 grid into rotation or something like that.

I’m using the game OzoneForce as a bit of an inspiration for what I’m doing. I’ve looked at all of its python files and I understand how it works, except the getOrientation command. I don’t want to copy it though, so if there’s a different way to find an object’s rotation, that’d be great.

I hope this doesn’t sound like too much to ask… but this could mean the difference between my first game and having to wait until college or whenever. This is essentially the only thing standing in my way. Please help!

There is an orientation tut in the GE resources.

You mean this? --> Tutorial: Orientation Matrix [Rotation about any point added]

Yeah, I read that earlier, and that did help me a little, but is there anybody who has a more “simplified” tutorial? (Or was that already simplified? haha) If not I suppose I could try to figure that one out with my dad…

Here is just a little tut:

And this may be more helpful, I didnt finish reading it though:

Here is a camera orientation script:

And here is a script to rot an object exactly:

Here is orientation script for shadow, but it came from the ba here:

This Might help a lot its an explaination of 3d objects and rotations etc:

Textbook stuff:

Sad to say you gotta learn vector and matrix math (Grd 12 math at least) to use the orientation function, because it returns a matrix representing the orientation. Read a good book on graphics programming or just vector math. The orientation document previously posted doesn’t give a good explaination for someone who hasn’t a clue what a matrix is. Fortunately you dont actually need to know trig to work with orientation matrixes. Once you get your head around vector and matrix operations its pretty much as simple as algebra. Look up matrix multiplication, cross products,and vector operations on the net and you might not need a book on the subject.

Woah, thanks a LOT ititrx for all those tuts, I should be able to find something to help me out.

Zeglr, I think I’m starting to understand how they work. Hopefully I wont have to wait until 12th grade, but I guess we’ll just have to see.

you are welcome lol

Yeah, I definately see how I can use this now. Thanks so much, guys!

BTW, if I end up completely making this game, I’ll try to mention you guys in the credits. :wink:

Good luck with your project.


You trying out for “link master” or something? lol

Good job.

I read the first few paragraphs of it, and that should help a LOT. Thanks sooooooooo much!

And you’re not too late, I haven’t had the time to make any progress. :slight_smile:

Try this:


should work almost like parenting right? if the y is a vector that points in the object’s y direction, why doesnt “anotherObject” rotate in the same direction as "object"s Y axis?