AVI

My website code stuff


Project maintained by Locust0 Hosted on GitHub Pages — Theme by mattgraham

HOME


Interacting with Seeds and Trees

January 16, 2019

I’ve been working on interactable objects as part of making the seed growing and tree warping work. Essentially, interactable objects spawn a custom interact trigger box around themselves with custom specifications. Alternatively, you can attach an interact trigger to the interactable and it’ll just use that one.

The interactable object listens to its trigger box which feeds it info such as when the player is in range and when the player interacts with it.

Seed Throw

When you throw a seed, it’ll eventually come to rest and spawn an interact trigger. Standing in that trigger will cause the seed to have an outline and interacting with that seed will pick it back up.

Note that in the below gif, the purple box is just for debugging and represents the actual interact trigger.

Gif

What I still need to add is the ability to cast a spell on the seed once its done growing. Ideally, the player will cast out a vector which will look for a seed’s interact trigger. Then when you try and cast, you will send a message to the interact trigger in front of you, causing the seed to grow.


Tree Warp

“Trees” are objects with a specific kind of interactable component attached. They have all the same functionality of a normal interactable object plus the added ability to turn its own collision off when the player enters it.

Once you’ve entered a tree, you have all physics disabled and hover within it with a view outside it. Interacting again will exit the tree.

Gif

Ideally, once within a tree, if you look at another tree’s interact trigger and interact, you should teleport to that tree. Once this step is done, tree warp will be fully prototyped.


HOME