Forward vector not changing with rotation of object

Hello,
i am trying to get the forward vector of a mesh that i can rotate. But the forward vector doesn’t change when the mesh does. i have seen other similar problems where the solution was to use the velocity but that didn’t work ether (or i implemented it wrong).

Bild_2024-03-21_111447495

Hey @TH3_D0C!

Are you rotating the mesh without rotating the actor? Would you mind sharing your blueprints so far in regards to rotation so we can get a better idea of what may be going wrong?

Any additional specifics you provide may go a long way in solving your problem.

1 Like

Hi, you are getting forward vector from your mesh but if your mesh is parented to a scene component or something else in your blueprint this may be the issue.
So get the vector from your scene root component or set your mesh as the root component

++

Seems you are adding 100.0 expecting it to offset in the direction. The correct way is to multiply the forward vector * 100.0.

2 Likes

Ok so i have a Sphere that i am adding a force to and then copying the location of the Car to the sphere.

Then i am taking the average of two line traces downwards to get the normal vector of the ground to adjust the rotation (Pitch).

For the Yaw i am rotating the Car with two inputs and then the sphere gets the force based on the direction.
image

As you pointed out, i think i am applying a rotation to the mesh.
image

How would i go about changing the actors rotation?

Ahh ok that fixed it. Now i sticks to the car. Thx!

1 Like

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.