# Translate Point B in relation to point A?

This topic is 684 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

## Recommended Posts

I have 3 matrix4.
glm::mat4 A;
glm::mat4 B;
glm::mat4 C;

I wish to translate and rotate A to C and B gets translated and rotated with it as in this diagram. How to get B? This is 3D, x, y & z. Any ideas?

Edited by paulgriffiths

##### Share on other sites
C * A^-1 * B? Something like that, anyway.

##### Share on other sites

C * A^-1 * B? Something like that, anyway.

What does the ^ mean?

Thanks.

##### Share on other sites

C * A^-1 * B? Something like that, anyway.

What does the ^ mean?
Thanks.

^ means "superscript", so A^-1 means "the inverse of A"

##### Share on other sites

C * A^-1 * B? Something like that, anyway.

What does the ^ mean?
Thanks.

^ means "superscript", so A^-1 means "the inverse of A"

Thanks, I tried it:

B = C * glm::inverse(A) * B;

Appreciated!

1. 1
2. 2
Rutin
21
3. 3
4. 4
A4L
15
5. 5
khawk
14

• 13
• 26
• 10
• 11
• 44
• ### Forum Statistics

• Total Topics
633742
• Total Posts
3013634
×