Search Unity

Question (Visual Scripting) Character Rotation w/ Camera Movement

Discussion in 'Visual Scripting' started by StepOne_DrawCircle, Mar 5, 2022.

  1. StepOne_DrawCircle

    StepOne_DrawCircle

    Joined:
    Feb 18, 2022
    Posts:
    3
    Hello. I am sure the answers to my questions are out there already, however I cannot seem to find them. I have spent the past 2 days searching for them.

    Basic issue I am having is I want to set up visual scripting to have my character rotate with the camera so that moving forward is always linked to the direction the camera is facing.

    I know it has to do something with getting the camera forward direction and applying it to the player's forward direction, however I can't seem to make the player's axes rotate.

    I am using a Cinemachine freelook camera with this and the new input system.

    I have linked a YouTube video below to show my issues. Any help would be greatly appreciated.

     
    Last edited: Mar 5, 2022
  2. StepOne_DrawCircle

    StepOne_DrawCircle

    Joined:
    Feb 18, 2022
    Posts:
    3
    Figured it out. I was missing components in my movement. Below are what I have that is working now.


    Screenshot 2.png
    Screenshot 1.png
     
    MogarBobac and casraf like this.
  3. Sudarshank123

    Sudarshank123

    Joined:
    Jun 11, 2022
    Posts:
    1
    hey ive tried using the same script as shown in the screenshot but i still cant get it to work my camera will rotate but my character is stuck using the same movements. any ideas? i can post screenshots if anyone wants
     
  4. okamimask21

    okamimask21

    Joined:
    Jan 13, 2023
    Posts:
    1
    You are freakin’ genius! Thank you for the system)))
     
  5. AtWalsh2009

    AtWalsh2009

    Joined:
    Jul 31, 2021
    Posts:
    1
    These scripts are going to be put in the main camera, am I correct? I saw you mentioned cinemachine, do i need that as well?