0
$\begingroup$

I have a current setup whereby the camera can pan 360 around the character when stationary, but how can I make it so that forward movement snaps towards the direction of the camera? I.e. you can use the mouse to turn while in motion. Is there a way to achieve this via logic bricks? Thanks.

enter image description here

$\endgroup$

1 Answer 1

0
$\begingroup$

Just add another camera. (just select the one you have and press Shift-D -> by doing this it is perfectly aligned and parented to your character and this is what you want)

Then you can use this node setup:

enter image description here

What it basically does is: change to camera, whenever you press w or a. Change to camera.001 whenever you press d.

$\endgroup$
5
  • $\begingroup$ <img src="https://blend-exchange.com/embedImage.png?bid=O5MD5Zg2" /> for some reason the movement messes up with this setup $\endgroup$
    – Minato
    Commented Dec 22, 2021 at 16:36
  • $\begingroup$ please recheck your (old) uploaded file because i didn't change anything of your movement... $\endgroup$
    – Chris
    Commented Dec 22, 2021 at 16:43
  • $\begingroup$ Hello. The old file has normal movement (you can check the original file), but when I add the logic node setup the movement messes up (you can check the new link). Thanks though $\endgroup$
    – Minato
    Commented Dec 22, 2021 at 16:49
  • $\begingroup$ Are you sure, the movement messes up or are u just irritated because you are looking through 2 different cameras while pressing different keys? $\endgroup$
    – Chris
    Commented Dec 22, 2021 at 17:08
  • $\begingroup$ Perhaps my program is the issue. I end up moving towards the sky for some reason. Thanks anyways though. $\endgroup$
    – Minato
    Commented Dec 22, 2021 at 17:14

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .