Best ways to use AddForce to an object

FlowCanvas Forums Support Best ways to use AddForce to an object

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #740
    earthman
    Participant

    Hi, I recently bought a few assets including PlayMaker, NodeCanvas and now FlowCanvas as I was encouraged by the reviews and saw potential in the future. The problem is lack of examples and videos, search google and you know what I mean (some of the reviews warned about the lack of examples but like I said this product has potential and I can wait a bit more). I thought FlowCanvas will fill the gap State machines and behaviour trees don’t thus my recent purchase of it.

    Wanted to try this asset first by building a simple breaker game where a paddle moves right and left on the x axis and a ball starts the game when projected with AddForce in upward position. I managed to make the paddle move as per “space invader” example in the download section.

    The problem I have now is I can’t make the ball project upward when a space bar is hit. In C# I can do it with ease using AddForce function But I can’t seem to use the AddForce node in FC, not sure of the input and output of this node and also using the Transform node to actually move the ball. I just need a simple example to project the ball on Y axis when a space bar is hit. No need to worry about x axis (angle of upward projection). I am not asking for a full example. Just a few linked nodes to get me started.

    Thank you.

    Attachments:
    You must be logged in to view attached files.
    #748
    Gavalakis
    Keymaster

    Hello and thanks a lot for getting NC and FC! 🙂
    Videos is something that will be shorted out within summer for sure.

    Adding a physics force can be done with the Rigidbody.AddForce node similar to c#. Most probably you also need to set the mode to be “Impulse” as well since you want to add the force when a button is pressed (instantly). I just tried this small example bellow and it worked as expected by pushing the object upwards when Fire1 is pressed down.

    AddForce

    Does this not work for you?
    Let me know . Thanks.

    Join us on Discord: https://discord.gg/97q2Rjh

    Attachments:
    You must be logged in to view attached files.
    #756
    earthman
    Participant

    Thank you. That worked and I got it expanded further.

Viewing 3 posts - 1 through 3 (of 3 total)
  • You must be logged in to reply to this topic.