Announcement

Collapse
No announcement yet.

grabbing physics objects

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

    grabbing physics objects

    Hello,

    I'm trying to make a little game with ragdoll physics like 'gangbeasts' or 'human fall flat'.
    I'm trying to get my hands to work so when i push the trigger on my controller the left/right hand
    will stick to what it hit. to do this i put colliders on both hands to check for collision.

    I've never used blueprints before, first time using unreal, I'm more of a Unity kinda guy. I do
    have good knowledge on c++. I just can't for the life of me figure out how to do this.
    as all I can find is "On Component Begin Overlap".. While I need a constant one so when I press the trigger,
    I can just somehow ask what I'm grabbing and somehow stick my character to it.

    Any help is appreciated.
    Thanks,
    Aaron

    #2
    Well maybe take a look at the VR template. Even though you don't use VR it will be very useful since it already comes with 2 hands (In the example bound to the VR controllers, but ignore that). There's a neat demo map where you can pick up boxes and drop/throw them. The mechanics from this can be recycled easily even for a non-VR game.
    My Patreon page (UE4 goodies!)

    Comment


      #3
      You can easily poll Overlapping Components with "GetOverlappingComponents()" which returns an array of Components.
      You can then check which you want to grab.
      For Grabbing itself, you may use a Physics Constraint. Simply attach a Physics Constraint to your Hand and constrain your desired Component to it with desired Limits.

      Comment


        #4
        did you manage to do this?

        Comment

        Working...
        X