Skip to content
Snippets Groups Projects

feature(Interaction): improve grabbing

Merged Daniel Rupp requested to merge daniel.rupp/rwth-vr-toolkit:dev/5.3 into dev/5.3
All threads resolved!

Here are some problems I encountered with the grabbing behavior.

1. Search for UInteractable at parent component if hit actor is a child actor

Setting: A parent actor that contains a child actor, e.g. a WIM that contains a smaller representation of a real object as child actor. Problem: Currently it is not possible, that the parent actor is grabbable, if the child actor is not grabbable. Reason: In GrabComponent.cpp a sphere cast is done to find objects close by. If the sphere cast hits the child actor we search for UInteractableComponent in the child actor, which we do not want to be grabbable, therefore there is no UInteractableComponent.

Solution:

  • Provide a way to specify the actor that should move (parent or child etc.). Since this might be an edge case, I just used a boolean flag for now that per default behaves like before.

2. Expose a TryRealease() function that releases the currently grabbed object

3. InteractableComponent can broadcast OnActionStart events without requiring hover to be called first.

This is a little bit misleading. I kind of expect, if I subscribe to the OnActionBegin event in the grabbing component, that this is called after the object has successfully been grabbed. I now added OnBeginGrab/OnEndGrab events returning the grabbed object and a IsObjectGrabbed() function

Discussion: I think in general, OnActioStart events should only be called if we currently hover.

4. GrabbablesInRange.AddUnique() in GrabComponent.cpp

An actor can have multiple static meshes, that return a collision, therefore we would add the same actor multiple times which is probably unwanted behavior.

5. Added option to only grab closest object

Edited by Daniel Rupp

Merge request reports

Loading
Loading

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
    • Resolved by Daniel Rupp

      Can you also rephrase point 3? So currently it is possible that OnAction is called without OnHover being called first? When does it happen ? Depending on the circumstances we should probably discuss if we want the OnHover first or just supress OnAction.

    • Resolved by Daniel Rupp

      Discussion w.r.t to childs being grabbable. We basically have 4 possibilities:

      G = Grabbable 
      N = Not Grabbable
      
      # Parent  Child Behaviour 
      1 G       G     What should we do here? What should happen if the child is grabbed? Move Parent or
                      move child relative to parent ?
      2 G       N     We check if parent is grabbable and if it is we move the parent?
      3 N       G     Do we move the child relative to the parent or do we apply the transform to the parent?
      4 N       N     Nothing

      Do we find a solution that is always correct, or should we have options to specify behaviour for cases 1 and 2 ?

      Edited by Marcel Krüger
  • Daniel Rupp added 1 commit

    added 1 commit

    • abffb24d - fix(interaction): use first encountered UInteractable

    Compare with previous version

  • Daniel Rupp added 8 commits

    added 8 commits

    • abffb24d...49b2e936 - 6 commits from branch vr-vis/VR-Group/unreal-development/plugins:dev/5.3
    • 38c5fba2 - Merge branch 'refactor/pawn_movement_var' into '5.3'
    • 6027ba91 - Merge branch rwth-vr-toolkit:5.3 into dev/5.3

    Compare with previous version

  • I am now searching up the hierarchy from the hit geometry for the first encounter of UInteractable, therefore it is up to the user to define the grabbing behavior of actors that are comprised of multiple child actors. This results in the following default behavior:

    G = Grabbable N = Not Grabbable

    Parent Child Behavior
    G G If geometry of the child is grabbed, move child in relation to parent. If geometry of the parent is grabbed, move parent.
    G N If geometry of child is grabbed, move parent (can be disabled by boolean flag). If geometry of parent is grabbed, move parent.
    N G If geometry of child is grabbed, move child in relation to parent. If geometry of parent is grabbed, do nothing.
    N N Nothing.

    This also works in deeper hierarchies. E.g. A->B->C (-> means is parent of). If A and C are grabbable, then if geometry of C is grabbed move C in relation to B. If B is grabbed move A(can be disabled by a boolean flag), if A is grabbed move A.

    Edited by Daniel Rupp
  • Daniel Rupp added 1 commit

    added 1 commit

    • dc178e3b - style(interaction): space after if, else, fix(interaction): removes unused includes

    Compare with previous version

  • Daniel Rupp added 1 commit

    added 1 commit

    Compare with previous version

  • Daniel Rupp added 1 commit

    added 1 commit

    • 5b13d00a - style(interaction) applied style format from file h

    Compare with previous version

  • Daniel Rupp added 1 commit

    added 1 commit

    • 1eb66f4c - fix(interaction): adds flag to disable searching up the hierarchy for UInteractable

    Compare with previous version

  • Daniel Rupp added 1 commit

    added 1 commit

    • b497451b - style(interaction) applies clang format

    Compare with previous version

  • Daniel Rupp marked this merge request as ready

    marked this merge request as ready

  • @david.gilbert not sure why clang-format pipeline failed.

  • Daniel Rupp added 1 commit

    added 1 commit

    • ca59a7f7 - style(interactable) applied clang format

    Compare with previous version

  • Added a few minor comments that I think should be solved. There are a few major points still open, but I don't think we should solve those in this PR.

  • David Gilbert added 2 commits

    added 2 commits

    Compare with previous version

  • David Gilbert resolved all threads

    resolved all threads

  • Marcel Krüger added 2 commits

    added 2 commits

    • 20e64dd3 - refactor(interaction): Removes grab specific IMC registration
    • cb531bc6 - refactor(interaction): Adds checks for grabbed objs; improve readability

    Compare with previous version

  • Marcel Krüger requested review from @david.gilbert and removed review request for @marcel.krueger

    requested review from @david.gilbert and removed review request for @marcel.krueger

  • Marcel Krüger added 1 commit

    added 1 commit

    • be777cc7 - refactor(interaction): Adds checks for grabbed objs; improve readability

    Compare with previous version

  • David Gilbert added 1 commit

    added 1 commit

    • b6a97e96 - refactor(Interaction): Removes unnecessary include

    Compare with previous version

  • David Gilbert resolved all threads

    resolved all threads

  • David Gilbert added 21 commits

    added 21 commits

    • b6a97e96...487a5db5 - 20 commits from branch vr-vis/VR-Group/unreal-development/plugins:dev/5.3
    • 2276f943 - Merge remote-tracking branch 'remotes/upstream/dev/5.3' into daniel/dev/5.3

    Compare with previous version

  • David Gilbert added 2 commits

    added 2 commits

    • f13b026f - refactor(Interaction): Moves IgnoreActors array to member variable, allocates...
    • bb0473fb - refactor(interaction): Moves simple interaction test map to own folder and...

    Compare with previous version

  • David Gilbert added 1 commit

    added 1 commit

    • ac6de687 - refactor(Interaction): Correctly sets up input actions and test map such that...

    Compare with previous version

  • David Gilbert mentioned in commit 9c9c670d

    mentioned in commit 9c9c670d

  • David Gilbert mentioned in commit 46e82b7c

    mentioned in commit 46e82b7c

  • David Gilbert mentioned in commit 9b50f726

    mentioned in commit 9b50f726

  • merged

  • Please register or sign in to reply
    Loading