Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
How to make an object hold Obi Fluid?
#4
(09-10-2024, 07:58 PM)vivi_j Wrote: Yes! Here's what it looks like: https://imgur.com/a/chemistry-flask-foll...er-bbCEPZg. I really just looked at the Faucet and Bucket sample scene and tried to replicate it with my erlenmeyer flask.

Everything collision-related seems ok. Double check that your flask mesh is readable by the CPU, (in the model import settings, check "read/write enabled") otherwise the engine won't be able to read the mesh data and as a result nothing will be able to collide against it.

In the ObiSolver component, there's a warning stating that you haven't installed any of the Burst dependencies. As a result, Obi will run slower than it could. Please check the setup guide:
http://obi.virtualmethodstudio.com/manua...setup.html
http://obi.virtualmethodstudio.com/manua...kends.html

(09-10-2024, 07:58 PM)vivi_j Wrote: When you say moving the container, are you referring to moving it via a script or manually?

Everything that happens in a game happens because there's a script doing it (either written by you, or part of a library/asset). So not sure what you mean by "manually", as opposed to script-driven?

(09-10-2024, 07:58 PM)vivi_j Wrote: I've tried moving the bucket y'all provided with OVR hands and it works just as fine. I don't have any additional scripts in this project (especially nothing to deal with teleportation)

There's basically two ways to move an object: via physics or via modifying its transform. The most common one is modifying the transform, like this:

Code:
object.transform.position = newPosition;

This is to be regarded as "teleportation", since the object will ignore physics and just get moved to a new position instantly. So if you were doing flask.transform.position = hand.position; that would not allow the flask to contain fluid as the fluid would have no clue when/where the flask is going to move: the flask would just move to a new position and leave the fluid -or other objects contained inside it- behind.

Moving an object via physics involves modifying the object's velocity, either directly or indirectly (adding a force, impulse, acceleration, etc) which is what the OVR HandGrabInteractable script does, judging from its documentation.

kind regards,
Reply


Messages In This Thread
How to make an object hold Obi Fluid? - by vivi_j - 09-10-2024, 02:11 AM
RE: How to make an object hold Obi Fluid? - by josemendez - 14-10-2024, 08:23 AM