Download

Camera Based Vector Movement

So with the third person template, the actor will always move forward in the direction that the camera is facing.

There is the Rolling Template with an actor that torques in the direction that the keys are pressed, but does not move to the direction of the Camera rotation. I would like this actor to function the same way as the Third Person Template actor does, torquing in the direction the camera is pointing when move forward is pressed. I have worked on trying to change this myself in Blueprints to no success.

Could anyone help me understand how to move this physics based actor according to the camera direction, through blueprints, instead of linearly to (Left, Right, Forward, Back) via WADS ?

Hi @Nexussfire

i think that for moving physic enabled mesh, you have to use node physics related, like add torque,
you can make a pawn with inside a ball with physics but it will not move with add movement.

To torque toward the direction of the camera you have to get the camera vectors.
i played a bit with forward and surprise surprise you have to use the Right vector to go toward.
i made the camera rotate with A&D and she is child of a scenecomponent,
so i just get the location of the sphere and set there the scenecomponent to make teh camera follow me.
Getting the camera direction is not always easy,
sometimes you want “Flat” the direction .

Thank you. I was wracking my brain around this issue for weeks. I had tried grabbing the camera forward vector but not thought to try the right vector instead.