Intro
So, at a recent meeting we discussed concepts for a new project. Everyone brought cool ideas and while we’re still working out exactly what idea we’re doing, in passing a comment was made about how tearing apart objects in VR is a cool idea with generic applications. And y’know what? That’s right! And so I spent the last week working on this “Tearing” mechanic and now I’ve got the first iteration of the mechanic to show off.
Abstract
Simply put, the system currently works by tracking the offset between a user’s hand in physical space vs the hand in virtual space. When that offset reaches a threshold set by Tearable.cs, the object “tears”.
Assets
Tearable.cs – Inherits from Grabbable.cs, since this is just a specialized Grabbable, it made sense to do this so we decrease the amount of components needed on an object and decrease bloat. And all the additional logic can be turned off with a boolean, so if you want to use just the base Grabbable system, you can just set isTearable to false and boom! You’re back to it just being a normal Grabbable.
DestroySelf.cs – An object destroys itself after a period of time that can be set in Editor. Used for Tear System.
Tear System – A particle system that activates on tear. Currently set to a cube mesh for the particle, however the color and scale of the particles scales with the object.
Breakdown
This system is based entirely around measuring the distance between the physical and virtual hand. This is great for a multitude of reasons:
- Works with stationary objects, which all objects will be as you pull them in opposite directions with equal force
- Because it doesn’t measure something tied to the physics system like object speed, there are no weird situations where holding an object with both hands and moving too fast causes the object to break unexpectedly
- Because it’s reliant on the hands and not the object, it can be applied to any object and the base functionality works immediately
Although, the fact that it doesn’t rely on the physics interactions does limit the scope of this iteration, and introduce design complications like the tearing not being dynamically responsive, you’ve either torn the object fully or you haven’t, there’s no mesh tearing tricks to go half way.
The divisibility is user friendly, and only a click away. You can set an object to be your output, but if you don’t and still want divisibility, the object sets itself as the object, then divides in half indefinitely.
Future Considerations and Learning Applications
So where do we go from here? My next tasks will be incorporating the Rigidbody component into this project. Right now the object will visually split, but physical components like the mass stay the same, so next up would be that.
For learning applications I could see this being used in really any application. Viscerally the action of pulling an object apart fits a ton of educational genres. In biology, you could tear open objects to look inside them, like coconuts or eggs. In chemistry, you could tear apart molecules or atoms (and watch your virtual world explode from the fission).
Conclusion
So that’s my update! I’m super excited to further iterate on this and see where it goes. Stay tuned for the next update to this project when I attach the Rigidbody and Forcible component.
Leave a Reply