Hello dear forum,

there is something I need help with and my understanding of vectors might be too limited to do so frown .

Basically I have a 3d model with an opening at one end (a cannon) and I want it to shoot projectiles.
Now, I do not want the projectiles to start shooting from the object-base (0/0/0) but rather from the opening.

In neutral position, I could just define a starting-point for my projectiles at the coordinates
Quote:
vector(object.x + 100, object.y, object.z + 20)

This way, when the object (the cannon) just stays as it is, the projectile can be created at my new coordinates, which is at the opening.

This works and is completely fine, but of course, as soon as I rotate my cannon it does not fit anymore.
The coordinates I defined for the starting-position of my projectile will always stay the same, no matter which way the cannon is rotated. This makes sense and I understand why it is like that, but I really want the starting-position to rotate along with the cannon in the correct way, so its always at the cannons opening.

In workshop 24 , all the way at the bottom, is a code for a 3rd person camera perspective, bound to the player-object. I figured that this code might fit my situation but so far I did not have any success with anything.

What is the best way to let my starting-position correctly rotate along with my object?
Thanks for any help in advance smile