Ideas Around Grabbing System

My idea is to create a component:
Definitions:

  • Token. the object that can be carried and activates teh platform
  1. This component will have all the interactios (Should I add this component to the Pawn or to the “token” and invert the logic? mmm)
  2. This component may grab (or be grabbed by) another actor by adding a AActor* pointer
  3. This grabed actor is the “token” that will be placed over the platform.
  4. Pawn can “Carry” this actor by adding a Property to the Pawn pointing to this “token”
  5. if Pawn enters Platform and Carry is pointing to a valid “token” then this token will become ActorThatOpens in OpenDoor Component.
    ***valid token may need to be an additional property of potential tokens. (???)
    and Pawn can release teh token by pointing to null (careful with null pointers)
  6. Because ActorThatOpens is collisioning with platform, then door shouldn’t close… I hope.
    more to come…
2 Likes

I just have an idea…
Add a TriggerVolume to an Static Mesh the Token…
Add a Component to this Token.
if DefaultPawn overlap TriggerVolume of Token and press keyboard key XXX then
Token is grabbed by Pawn… Component property grabbed by is et to Pawn.
Move them together (Don’t know how exactly but may use Pawn and Token coordinates
If Token overlap Platform Trigger Volume then Open door (We may need to add the change to have more AActors in ActorThatOpens)

If DefaultPawn overlap Platform Trigger Volume then Open door
If DefaultPawn press YYY key and is grabbing something then release Token at Default Pawn coordinates.

1 Like

Privacy & Terms