Toggle Camera during Node Grabber

Discussion in 'Ideas and Suggestions' started by NoxiousFumes, Jul 17, 2016.

  1. NoxiousFumes

    NoxiousFumes
    Expand Collapse

    Joined:
    Apr 24, 2016
    Messages:
    675
    I was thinking it would be helpful to make an option in the settings where you could toggle free camera and the orbit camera when u use node grabber. I like the old camera better than the free camera.
     
    • Like Like x 1
  2. Nadeox1

    Nadeox1
    Expand Collapse
    Spinning Cube
    BeamNG Team

    Joined:
    Aug 5, 2012
    Messages:
    14,683
    Already been asked. We would avoid filling the options with too many toggles.

    Orbit camera + Node grabber makes delicate stuff impossible due the camera moving as soon you move the vehicle.

    While free camera + node grabber allows for much more control as the camera is not attached to the vehicle, hence it's more precise.
     
  3. Narwhal

    Narwhal
    Expand Collapse

    Joined:
    Aug 4, 2013
    Messages:
    1,698
    I just want some clarification here. Is the orbit camera with node grabbing not going to happen? Cause i cant use the node grabber anymore because it switches to free camera. I use free camera as my spawn point, and dislike having it moved every time i use node grabbing.
     
  4. Nadeox1

    Nadeox1
    Expand Collapse
    Spinning Cube
    BeamNG Team

    Joined:
    Aug 5, 2012
    Messages:
    14,683
    Yes, it's not happening.
    It was switched to free-camera because many people complained it was making small maneuvers impossible.

    TIP: After you grab a node, you can let go the CTRL key, and use WASD with your hand while holding the mouse click with the other. That way moving the camera is way easier.
     
  5. Narwhal

    Narwhal
    Expand Collapse

    Joined:
    Aug 4, 2013
    Messages:
    1,698
    Its not moving the camera thats the problem. It is the fact that it move freecamera everytime so i lose the freaking spawnpoint. Sadly they are not going to add a toggle button in for this, but this is really making me mad. I have not used the node grab camera BECAUSE of this annoying feature and have actaully stopped playing beamng due to a couple things, This problem being one of them. It messes up gameplay completly and annoys the crap out of me. I wish they would just add a toggle for it. But they are not going to for just ONE person. So i guess im screwed huh?
     
    • Like Like x 1
  6. Nadeox1

    Nadeox1
    Expand Collapse
    Spinning Cube
    BeamNG Team

    Joined:
    Aug 5, 2012
    Messages:
    14,683
    Oh, I see your issue.
    Remember that the F7/F8 thing is not a feature but a debug left-over.

    You can actually edit some file to change that camera behaviour.

    Go to BeamNG.Drive (Directory) /gameengine.zip/core/scripts/server/commands.cs
    Remove these lines:

    63 to 65
    Code:
        %client.camera.setVelocity("0 0 0");
        %client.camera.setTransform(%client.player.getEyeTransform());
        %client.setControlObject(%client.camera);
    
    70
    Code:
            %client.setControlObject(%client.player);
    
    Note, editing core files is not suggested. If you encounter problems, your dishwasher starts to speak or whatever, don't forget you have this file edited.



    ( How to stop node grab using free camera ) - This bit is to help the search bar finding this easier
     
    #6 Nadeox1, Jul 20, 2016
    Last edited: Aug 8, 2016
  7. Roasted Bunny

    Roasted Bunny
    Expand Collapse

    Joined:
    Apr 4, 2015
    Messages:
    83
    "If you encounter problems, your dishwasher starts to speak or whatever" LOL XD
     
  8. BallisticDK

    BallisticDK
    Expand Collapse

    Joined:
    Aug 4, 2013
    Messages:
    144

    Massive bump, but i feel it's kinda useful for some people, including me.

    In version 0.8.0.1
    The code that detaches the camera from the car, is in the same file (BeamNG.Drive (Directory) /gameengine.zip/core/scripts/server/commands.cs) as @Nadeox1 said, but now it's not on the same lines.

    This is the code, that does it. on line 15 to 23

    Code:
    function onNodegrabStart() {
        $mustSwitchBack = Game.getControlObject() == getPlayerVehicle(0);
        if ($mustSwitchBack) setCameraFree();
    }
    
    function onNodegrabStop() {
        if ($mustSwitchBack) setCameraPlayer();
        $mustSwitchBack = false;
    }
    
    Now if you just remove that the game can and will break, because the functions is called somewhere else.

    instead you should comment out the lines like this
    Code:
    function onNodegrabStart() {
        /*$mustSwitchBack = Game.getControlObject() == getPlayerVehicle(0);
        if ($mustSwitchBack) setCameraFree();*/
    }
    
    function onNodegrabStop() {
        /*if ($mustSwitchBack) setCameraPlayer();
        $mustSwitchBack = false;*/
    }
    
    I just posted this because i don't like the way the camera is handled in nodegrab mode, but i have no idea if this breaks the game at some point, or if the code is used somewhere else.
    Remember, again as @Nadeox1 said, it can and will break the game at some point, and if it does it's probably editing this that does it.
     
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice