Discussion about math, puzzles, games and fun. Useful symbols: ÷ × ½ √ ∞ ≠ ≤ ≥ ≈ ⇒ ± ∈ Δ θ ∴ ∑ ∫ π -¹ ² ³ °

You are not logged in.

- Topics: Active | Unanswered

**safra****Member**- Registered: 2005-12-03
- Posts: 41

Hi,

I have a Vector A (xyz) and another vector B (xyz). Let's say A becomes a "child" of B and inherits the B direction as the origin. How can I get the new direction of A based on its old direction and the direction B is pointing at?

Sorry for the poor explanation, I don't know the right wording for this which also makes it hard to search for the solution. I have read about matrices etc. but no luck so far.

Thanks!

Offline

**safra****Member**- Registered: 2005-12-03
- Posts: 41

I guess I meant how to rotate an existing vector according another vector?

I have been reading about quaternions, cross products, eulerAngles etc, still confused on how to do this?

Anyone who knows how to do this?

Offline

**bobbym****bumpkin**- From: Bumpkinland
- Registered: 2009-04-12
- Posts: 109,606

Hi safra;

Any of this useful to you? It is horribly formatted but...

**In mathematics, you don't understand things. You just get used to them.****If it ain't broke, fix it until it is.**** Always satisfy the Prime Directive of getting the right answer above all else.**

Offline