Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 13 Next capture
2021 2022 2023
1 capture
13 Jun 22 - 13 Jun 22
sparklines
Close Help
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
  • Asset Store
  • Get Unity

UNITY ACCOUNT

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account
  • Blog
  • Forums
  • Answers
  • Evangelists
  • User Groups
  • Beta Program
  • Advisory Panel

Navigation

  • Home
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
    • Blog
    • Forums
    • Answers
    • Evangelists
    • User Groups
    • Beta Program
    • Advisory Panel

Unity account

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account

Language

  • Chinese
  • Spanish
  • Japanese
  • Korean
  • Portuguese
  • Ask a question
  • Spaces
    • Default
    • Help Room
    • META
    • Moderators
    • Topics
    • Questions
    • Users
    • Badges
  • Home /
avatar image
0
Question by Riiich · Sep 01, 2021 at 07:20 PM · gameobjecttransformmultiplayertrigger

What would you do with essential items?

I'm currently building a teambuilding game for VR, for a client. In the game the players will need to collect and bring along a few essential items with them. Some of the items will be able to be "equiped" to a players inventory, but some items will only be able to be held by the players and used in that location. The players will be on a linear path, high up on a mountain.

Now my dilema is I'm trying to think of a good way to be able to return "lost" items to the players. For example, in one part the players will need to fill a bucket with water. Imagine one of the players tosses the bucket over the ledge and down the mountain.

Here are my current solutions:

  1. Have the object automatically teleport back to a certain position if an item is "lost".

  2. Have the admin (who is running the server via a PC, and can interact with the game) manually move items

The issues are:

  1. What kind of trigger should be used? Should I manually create trigger areas outside of the walking area that starts a "Teleport back" method, also where should the return point be? Say I use the last place the bucket had velocity 0, but that still might be outside of the players reach

  2. If the admin can't physically see the item, it might be hard to get back

I'm thinking the admin might need an on screen list of items that can be "reset" if need be, or even manually moved.

Any other ideas from this creative community?

Comment
Add comment
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

1 Reply

· Add your reply
  • Sort: 
avatar image
1
Best Answer

Answer by Kona · Sep 01, 2021 at 09:25 PM

Personally, I'ld go for the first option. If it could happen' several times it could become irritating for the admin to constantly reset the item. :)

If your game takes place on a mountain and the most common case of losing an item would be to drop it over a ledge you could make the game master ( or equivalent ) hold a property of lowest-allowed position along the y-axis for items before beeing reset. This would need you to ensure that all non-reachable locations are deep enough though, but you won't have to create triggers everywhere on the other hand.

Then at regular intervals compare the y-position of the item and the lowest-reachable-point to see if the item is to be reset or not.

As for teleporting the item. An idea would be to have multiple "checkpoints" or "item-respawn-platform-thingies" and when the item is reset simply check distance to each item respawner and place the item at the nearest one.

Otherwise I'ld suggest raycasts. While the item is beeing carried you could cast a raycast downward once every 2-3 seconds and determine if there's a reachable surface beneath it. This could require setting up some tags though for surfaces that are reachable or not reachable, then comparing the object hit with the raycast if it's tag matches, and if so caching the hit point as "last safe point" or something for later reference.

//Edit Now when I think about it... if you would perform raycasts at regular intervals while carrying the object, it should probably work just as well for detecting if the object enter a non-reachable area- either due to a lack of colliders or if the collider is tagged as not-reachable

Comment
Add comment · Show 1 · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image Riiich · Sep 03, 2021 at 10:00 AM 1
Share

I ended up creating a custom script so the ad$$anonymous$$ can easily reset the object to the mouseToWorld position and simple toggles showing an outline of the object through walls too :)

Great idea with the raycasts, I'll have a look at that solution in the future when adding quality of life updates!

Your answer

Hint: You can notify a user about this post by typing @username

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this Question

Answers Answers and Comments

289 People are following this question.

avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

How to pick up objects 1 Answer

A transform.position to act as a Vector3 1 Answer

about loop transforming objects 1 Answer

My script doesnt respond what i wrote HELP!!! 0 Answers

Navmesh agent problem 1 Answer


Enterprise
Social Q&A

Social
Subscribe on YouTube social-youtube Follow on LinkedIn social-linkedin Follow on Twitter social-twitter Follow on Facebook social-facebook Follow on Instagram social-instagram

Footer

  • Purchase
    • Products
    • Subscription
    • Asset Store
    • Unity Gear
    • Resellers
  • Education
    • Students
    • Educators
    • Certification
    • Learn
    • Center of Excellence
  • Download
    • Unity
    • Beta Program
  • Unity Labs
    • Labs
    • Publications
  • Resources
    • Learn platform
    • Community
    • Documentation
    • Unity QA
    • FAQ
    • Services Status
    • Connect
  • About Unity
    • About Us
    • Blog
    • Events
    • Careers
    • Contact
    • Press
    • Partners
    • Affiliates
    • Security
Copyright © 2020 Unity Technologies
  • Legal
  • Privacy Policy
  • Cookies
  • Do Not Sell My Personal Information
  • Cookies Settings
"Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges