Position Animate Towards Object

Discussion in 'How Can I...?' started by 5petersonzachary, Dec 12, 2020.

  1. 5petersonzachary

    5petersonzachary Serious Boxer

    Joined:
    Jan 23, 2016
    Messages:
    569
    Likes Received:
    169
    Hello, how can I use the position animation node to make a character move towards a specific object in the scene. I am not experienced that much in javascript so I wouldn't know how to add this to the node. The object that the player would be moving to would also be moving constantly. Also if there are multiple of these objects in the scene how can I specify which one I want to move to, maybe using an if collide node or something else? Thanks!
     
  2. 5petersonzachary

    5petersonzachary Serious Boxer

    Joined:
    Jan 23, 2016
    Messages:
    569
    Likes Received:
    169
  3. Vlad-NY

    Vlad-NY Serious Boxer

    Joined:
    Jul 21, 2018
    Messages:
    604
    Likes Received:
    360
  4. 5petersonzachary

    5petersonzachary Serious Boxer

    Joined:
    Jan 23, 2016
    Messages:
    569
    Likes Received:
    169
    Thank you so much this is exactly what I was looking for! The only thing is, how can I make it so that the object doesn't get removed until the player is finished moving to it?
     
  5. Vlad-NY

    Vlad-NY Serious Boxer

    Joined:
    Jul 21, 2018
    Messages:
    604
    Likes Received:
    360
    why would you want something like that? it's not a coin it's a object position point if you want to add points using this system than add some points on top of the objects.
     
    5petersonzachary likes this.
  6. 5petersonzachary

    5petersonzachary Serious Boxer

    Joined:
    Jan 23, 2016
    Messages:
    569
    Likes Received:
    169
    Actually that's true, I don't know why I was trying to use it as an object when I could just parent an object to it. Thanks! All though another problem I ran into is if the player passes one of these points on the game path and tries to go to another one I get "Signal Filter Line 31 Error Null Reference"
     
  7. Vlad-NY

    Vlad-NY Serious Boxer

    Joined:
    Jul 21, 2018
    Messages:
    604
    Likes Received:
    360
    Hmm I'll have to debug it, for now please
    make sure you have no points while the player is moving to the point
     
    5petersonzachary likes this.
  8. 5petersonzachary

    5petersonzachary Serious Boxer

    Joined:
    Jan 23, 2016
    Messages:
    569
    Likes Received:
    169
    There are no points that get in the way of the player moving to one, but I get the error when the player moves past a point and tries to go to the next point if that makes sense.
     

Share This Page