Announcement

Collapse
No announcement yet.

Adding physics impulses to projectiles

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Adding physics impulses to projectiles

    Hello,

    I'm trying to find out how I can add impulses to a projectile to alter its trajectory. Specifically what I'm trying to do is make a grenade that a player can throw, and I want the player's velocity to "add" to the projectile's velocity (a player moving backwards would result in a weaker throw, while a player jumping or moving forward would result in a stronger throw). I also would like to make the explosions from said grenade have some influence on the trajectory of other grenades nearby.

    It seems like the only way to accomplish this is with the 'Set Velocity in Local Space' node, but I'm having trouble with the world space to local space conversions. Any help would be appreciated!
    Last edited by ausernottaken; 01-01-2017, 08:42 PM. Reason: solved

    #2
    Came up with something that seems to work. Posting it here in case this question comes up in any searches.

    Attached Files

    Comment


      #3
      Out of curiosity, how does Set Velocity compare with Add Force / Add Impulse in this scenario?
      ----------------------------------------------------------------------------------------------------------
      What are the BEST Unreal Tutorials / Docs? There are none tbh... Here's why
      Instead its better to just take projects apart (see the free 'creators' listed here)

      Comment


        #4
        Originally posted by franktech View Post
        Out of curiosity, how does Set Velocity compare with Add Force / Add Impulse in this scenario?
        I looked at that node and it takes Bone Name as a parameter, so I assumed it only worked with Skeletal Meshes. Set Velocity also lets you completely override the velocity, if you wish.

        Comment


          #5
          Originally posted by ausernottaken View Post
          I looked at that node and it takes Bone Name as a parameter, so I assumed it only worked with Skeletal Meshes. Set Velocity also lets you completely override the velocity, if you wish.
          Cheers! Seems to be optional, but the docs are often less than helpful:

          If a SkeletalMeshComponent, name of body to apply force to. 'None' indicates root body.
          https://docs.unrealengine.com/latest...sics/AddForce/
          ----------------------------------------------------------------------------------------------------------
          What are the BEST Unreal Tutorials / Docs? There are none tbh... Here's why
          Instead its better to just take projects apart (see the free 'creators' listed here)

          Comment

          Working...
          X