Modification Of My Free Move Node - Added Camera Follow

Discussion in 'Buildbox 3.0' started by LBPToo, Sep 14, 2018.

  1. LBPToo

    LBPToo Avid Boxer

    Joined:
    Nov 1, 2016
    Messages:
    233
    Likes Received:
    136
    Hi Guys(gender neutral), following is a modification to my Free Move node that allows the camera to optionally follow the character's rotation so you're always looking where you're going.

    I said: "It is very rough and is a bit jerky and needs to.be tweaked to smooth out the camera movement."
    I have worked extensively on this and it appears that it's an internal issue with the way the camera updates and would have to be fixed by Buildbox team.

    I have provided the Node in two forms, a stand-alone that does not require the Free Move node and can be used independently if you find the need, and a version integrated into the Free Move node with an attribute to check to turn on the Camera Follow capability.

    I have now combined bbassets of the two nodes in the enclosed zip. To use the nodes, simply drag the bbasset of the node you want to use into your projects 3D World. It will be added to your object list and you can either start with that actor that contains the node, or copy and past the node into your existing actor.

    Below is a short video of it in action and a zip is included for download with both the BBDOCs in it.

    First Person Perspective


     

    Attached Files:

    Last edited: Oct 21, 2018
    rywnshyhq, jcalle, Christoph and 3 others like this.
  2. LBPToo

    LBPToo Avid Boxer

    Joined:
    Nov 1, 2016
    Messages:
    233
    Likes Received:
    136
    Found a bug(and I'm sure there are more). Circle the bobbing bird 2 times and see what happens.
     
    Christoph likes this.
  3. LBPToo

    LBPToo Avid Boxer

    Joined:
    Nov 1, 2016
    Messages:
    233
    Likes Received:
    136
    The bug mentioned in my previous post is fixed and a new Camera Follow.zip has been uploaded. Also, as far as smoothing the camera movement, it is already somewhat controlled by the "Smooth" attribute from the Free Move component. In the new upload I have changed the Smooth to .8 from .5 and that helps, You are free to experiment with this value to see what works for you. FYI, a value of 1 stops all turning. I think more can be done to dampen the camera movement but this is workable now.
     
    Christoph likes this.
  4. LBPToo

    LBPToo Avid Boxer

    Joined:
    Nov 1, 2016
    Messages:
    233
    Likes Received:
    136
    Update node: My report of the Y and Z parameters being reversed was wrong. It was a result of me not noticing(and still not understanding) that the X and Z axes are parallel to the grid and the Y axis is perpendicular, unlike Blender and what I'm used to, but the same as Unity, so there must be a good reason for it.. This was the source of my confusion. I have updated this node to take this into account. This also includes the oscillate and camera follow nodes.
     
    Christoph and particles like this.
  5. whitedogapp

    whitedogapp Avid Boxer

    Joined:
    Oct 8, 2015
    Messages:
    226
    Likes Received:
    33
    Share with us code
     
  6. LBPToo

    LBPToo Avid Boxer

    Joined:
    Nov 1, 2016
    Messages:
    233
    Likes Received:
    136
    Hi whitedogapp, I enclosed the BBDOC in the original post. Just download that bbdoc which has the nodes in it and the code is in the custom nodes.
     
    Christoph likes this.
  7. particles

    particles Avid Boxer

    Joined:
    Aug 31, 2018
    Messages:
    286
    Likes Received:
    199
    LBPToo likes this.
  8. LBPToo

    LBPToo Avid Boxer

    Joined:
    Nov 1, 2016
    Messages:
    233
    Likes Received:
    136
    particles likes this.
  9. LBPToo

    LBPToo Avid Boxer

    Joined:
    Nov 1, 2016
    Messages:
    233
    Likes Received:
    136
    Added preview from first-person perspective.
     
  10. particles

    particles Avid Boxer

    Joined:
    Aug 31, 2018
    Messages:
    286
    Likes Received:
    199
    @LBPToo Can you export actor as a CameraFollowingActor.bbasset? It working fine. So that anybody just drags and drop in their project and use it.
     
  11. particles

    particles Avid Boxer

    Joined:
    Aug 31, 2018
    Messages:
    286
    Likes Received:
    199
    Meanwhile can you able do camera shake node? will use it for the game over, explosion etc. I can try too.
     
  12. LBPToo

    LBPToo Avid Boxer

    Joined:
    Nov 1, 2016
    Messages:
    233
    Likes Received:
    136
    Your wish is my command. I haven't tested that it works. Let me know if there are any issues.

    This bbasset has the free move and camera follow as two separate nodes. Combined one is in later post below.

    Note: This bbasset is now included in the zip contained in the original post in this thread.
     
    Last edited: Sep 22, 2018
    particles likes this.
  13. LBPToo

    LBPToo Avid Boxer

    Joined:
    Nov 1, 2016
    Messages:
    233
    Likes Received:
    136
    Hi @particles, I have to be honest, the nodes I have done and shared are a result of things I needed for the game I'm working on.. I really don't have the time to develop nodes I don't have an immediate need for. Sorry.
     
    particles likes this.
  14. particles

    particles Avid Boxer

    Joined:
    Aug 31, 2018
    Messages:
    286
    Likes Received:
    199
    Wow Superb. I have already tested by exporting yours as bbasset. It's working fine.
     
    LBPToo likes this.
  15. particles

    particles Avid Boxer

    Joined:
    Aug 31, 2018
    Messages:
    286
    Likes Received:
    199
    No problem. I am just sharing my thoughts.
     
  16. LBPToo

    LBPToo Avid Boxer

    Joined:
    Nov 1, 2016
    Messages:
    233
    Likes Received:
    136
    Here's an actor that has the free move and camera follow in one node.

    Note: This bbasset is now included in the zip contained in the original post in this thread.
     

    Attached Files:

    Last edited: Sep 22, 2018
    particles likes this.
  17. ThomasC

    ThomasC Boxer

    Joined:
    Nov 8, 2017
    Messages:
    63
    Likes Received:
    24
    Hi @LBPToo thank you for making these nodes they are extremely helpful.

    I'm trying to create a golf game where the camera rotates based upon where the "slingshot" is pointed. I'm trying to implement what you have already built here by taking out the
    /* MOVE CODE */, which works great (the slingshot node works again) but it seems like the rotation of the camera is either too much or not enough rotation in comparison with the direction in which the sling shot is pointing.

    Any ideas on how to camera rotation and slingshot direction correlate?
    Thanks!
     
  18. LBPToo

    LBPToo Avid Boxer

    Joined:
    Nov 1, 2016
    Messages:
    233
    Likes Received:
    136
    H
    Hmmm, I wonder if this is the problem I've run into with the camera.setRotation routine. I originally thought it was a bug in my code, but I've come to the conclusion it's the way the camera.setRotation code works....and I think it's a bug and needs to be fixed. With the move/camera follow node, and it isn't apparent in most situations, but if you move an object and "steer" really fast in one direction, then when you stop the rotation you'll actually see the object "bounce back" from the max rotation of the object. I think this location it bounces back to is actually the correct rotation. So it is over-rotating then adjusting back to the correct amount. I think this is something that needs to be fixed inside the camera.setRotation code in BB.
     
  19. whitedogapp

    whitedogapp Avid Boxer

    Joined:
    Oct 8, 2015
    Messages:
    226
    Likes Received:
    33
    Hello I used your first person node it is really good, but i need to click left mouse buttont to rotate character is it possible to rotate it only with mouse move not clicking? and how?
     
  20. LBPToo

    LBPToo Avid Boxer

    Joined:
    Nov 1, 2016
    Messages:
    233
    Likes Received:
    136
    I'm really sorry whitedogapp I haven't been working with BuildBox for several months and won't be able to help you.
     

Share This Page