Just have a empty that is moved to desired point, of which world objects are parented too. I then just rotate the parent empty. That should work a bit better.

EDIT: Actually no, that won’t work, they will keep moving when the pivot is moved. arg

Will give you a point in space relative to another object, but how do you rotate that vector using a local axis of object 1? Of course you can rotate object 1,

But I wonder how to rotate the vector by a point, without rotating the object1.

Rotations, Vectors and linV and angV kinda eventually demand you learn all about math, but don’t worry, math with application is much easier to learn then absrtact paper work.

I think teaching kids to make games would do more good then trying to push abstract paper math…

You are correct in how you get the vec_diff, you just need to rotate that vector, then set the object’s world position to be that vector (plus the pivot’s world position, since vectors are based at the origin). I tested this out myself and it does the trick.

If you want to rotate the obj around it’s own center as well (and not just have it move around the pivot), just don’t forget to add the line:

This is much simpler if you use mathutils.matrix.
It’s also more flexible as you can use lerp to transition smoothly from one matrix to another, for example a spaceship going in to orbit around a planet. Or a small drone which orbits the player but can fly off and pick up loot…

With matrix, lerp and smoothstep you can do some pretty awesome simple animations without rigging.

I don’t suppose you know some good maths for games programming tutorials? I can’t imagine there are any specific to BGE it’self.
My book on DirectX 9.0 does have a maths section covering basic trigonometry, vectors, matrices etc, which I’ve gone over a couple of times, it just doesn’t digest though. It’s not the most friendliest of text’s ever.

You don’t really need to know all the math in order to use matrices, since we have the wonderful mathutils.Matrix

All the toolsyou need are there, just have to use them in the right way.

Here’s a little example of using mathutils.matrix to rotate one object around another, or around any dynamic point: planets.blend (571 KB)

Comment out line 74 and use line 75, and you’ll see the red planet continue to go through its motions, even though they are not based on a current relation to any other object other than the offsets you saved during initiation.

For reference:
rotation * offset:
object rotates around the original point at the length of the offset

offset * rotation:
object rotates in place, at its new origin which is the offset

If we want the planets to rotate as well as orbit we would just create a new rotation matrix and put it at the end of the multiplication chain: