Skip to content
Snippets Groups Projects
Commit 77d460df authored by David Huss's avatar David Huss :speech_balloon:
Browse files

Added README and images

parent 16dbcb7b
Branches
No related tags found
No related merge requests found
# Interactable
These two scripts allow for Interaction between Players and GameObjects (e.g. by pressing <kbd>E</kbd>.
![Interactable Video](images/video.apng)
In this video you can see the cube changes its Material to a green one, once it is looked at, and when E is pressed a function is executed which moves it to the right.
## Installation
Import `Interacting.cs` and `Interactable.cs` as Assets into your scene by doing one of the following things:
- clone this repository into your assets folder
- download the repository as a zip folder, unpack it and drag the files into the Assets Window
- click the files and copy the text into a C# script of your choice (just make sure the class name matches the file name!)
## Usage
1. Drag the `Interacting.cs` onto the `Player` Object that also has the Camera on them
2. Setup the Keyboard Key you want to use for Interaction
3. Drag the `Interactable.cs` onto any number of GameObjects you want to allow Interactions with
4. Set up a Material and a Override Material and Add an Event (Object + Method) which will be executed whenever the object is beeing interacted with
![Interactable Component](images/interactable.png)
images/interactable.png

19.2 KiB

File added
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment