ExtendRealityLtd / ExtendRealityLtd/Zinnia.Unity

Action Source/Target for passing actions across a bridge

Open
#569 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
C#
Stars
321
Forks
36
PR merge metrics
No merged PRs in 30d

Description

from Discord:

```
I think interactors having a list of ActionSources is better than an ActionSource knowing about its interactor

this actiontarget/source concept is more about

i know both these sources can control this target but only under certain circumstances
i could have only 1 source control it
both or neither
so in the use case of interactables
its grabbing
and right now we have 4 (5 with custom whatever that means) states
first touched/touched/first grabbed/grabbed
so..
* the first controller that touches me gets the action link
* any controller that touches me gets an action link
* the first controller that grabs me gets the action link
* any controller that grabs me gets an action link
so a gun would be like first grab
the primary grabbing controller is my firing controller
```

```
this actiontarget/source concept is more about

i know both these sources can control this target but only under certain circumstances
i could have only 1 source control it
both or neither
so in the use case of interactables
its grabbing
and right now we have 4 (5 with custom whatever that means) states
first touched/touched/first grabbed/grabbed
so..
* the first controller that touches me gets the action link
* any controller that touches me gets an action link
* the first controller that grabs me gets the action link
* any controller that grabs me gets an action link
so a gun would be like first grab
the primary grabbing controller is my firing controller
```

```
this actiontarget/source concept is more about

i know both these sources can control this target but only under certain circumstances
i could have only 1 source control it
both or neither
so in the use case of interactables
its grabbing
and right now we have 4 (5 with custom whatever that means) states
first touched/touched/first grabbed/grabbed
so..
* the first controller that touches me gets the action link
* any controller that touches me gets an action link
* the first controller that grabs me gets the action link
* any controller that grabs me gets an action link
so a gun would be like first grab
the primary grabbing controller is my firing controller
```

```
this actiontarget/source concept is more about

i know both these sources can control this target but only under certain circumstances
i could have only 1 source control it
both or neither
so in the use case of interactables
its grabbing
and right now we have 4 (5 with custom whatever that means) states
first touched/touched/first grabbed/grabbed
so..
* the first controller that touches me gets the action link
* any controller that touches me gets an action link
* the first controller that grabs me gets the action link
* any controller that grabs me gets an action link
so a gun would be like first grab
the primary grabbing controller is my firing controller
```

```
i think i have a way of making it totally generic and even can be part of zinnia
i need to let it swill around in my head a bit first
this way you can keep using the ActionPublisher/ActionReceiver for a super simple way

but if you want to use ActionSource and ActionTarget components separately then you can
well i dunno how easy it is it to make it part of zinnia yet....
it'll all become clearer when i start on it
```

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.