Grabbing system thoughts

I’m not too sure how to code all of my thoughts, so I’ll be following the guided method. But below is how I’m thinking it might go.

Basic Features:

  • Interactive object highlights when player is close enough
  • Player can press key to interact with object to pick it up or store
  • Store object in inventory or manipulate in 3d
  • player can press key to drop item from inventory or from 3d manipulation
  • if valid object is placed in pressureplate door opens

Method(?):
Create component that allows an object to:

  • Give indicator when GetWorld()->GetFirstPlayerController()->GetPawn() is within set range. (Include whether player is looking at object if possible)
  • Allow player to pick up and carry object if above condition is met and pressing key (If there is inventory, then it will go in there)
  • Allow player to drop opject when pressing a key (Remove object from inventory at player’s current location)
  • Set ActorThatOpens in editor for door to the object that will open it (When lightly testing this idea with Sphere set as ActorThatOpens and having it in the pressureplate, doesn’t open the door. Even after commenting out “ActorThatOpens = GetWorld()->GetFirstPlayerController()->GetPawn();” Might need a different approach)
  • Component should have exposed variable that allows for toggling of whether the object is valid. This will allow for other objects to use the same component for interactivity without them necessarily being able to open a door.

Hopefully i put that clearly enough. Let me know if there’s anything I missed.

1 Like

Privacy & Terms