Like a beam+whip? - Printable Version +- Obi Official Forum (https://obi.virtualmethodstudio.com/forum) +-- Forum: Obi Users Category (https://obi.virtualmethodstudio.com/forum/forum-1.html) +--- Forum: Obi Rope (https://obi.virtualmethodstudio.com/forum/forum-4.html) +--- Thread: Like a beam+whip? (/thread-2680.html) |
Like a beam+whip? - dakom - 05-01-2021 I'm just getting started with Obi, and tried playing around with particle attachments - but couldn't figure out how to do the following: 1. I'd like one end of the rope to always start at a certain transform (the user's hand) 2. The other end should _fling_ out over time - think like ghostbuster's beam. If that other end collides with an object, it should _attach_ to that other object 3. While it's attached on both ends, I'd like to be able to _wiggle_ the path and propogate other things along it Basically, like a whip in that I can throw it out and hit something, and a beam in that it stays attached to the thing it hit. Any suggestions? RE: Like a beam+whip? - josemendez - 08-01-2021 (05-01-2021, 06:58 AM)dakom Wrote: I'm just getting started with Obi, and tried playing around with particle attachments - but couldn't figure out how to do the following: 1.- Use attachments: http://obi.virtualmethodstudio.com/tutorials/attachments.html 2.- Use collision callbacks to detect the collision: http://obi.virtualmethodstudio.com/tutorials/scriptingcollisions.html Then use either attachments or the particle API to hold the particle in place: http://obi.virtualmethodstudio.com/tutorials/scriptingparticles.html 3.- Wiggling will work automatically once both ends are attached to something. let me know if you need further guidance. cheers! RE: Like a beam+whip? - dakom - 08-01-2021 Thanks. One thing I didn't quite understand from playing around is how to generate the rope.. e.g. let's say there's different targets at 100 units away and 200 units away... Is there a way to generate the rope from that inverse of the target? Like given two transforms that will _eventually_ be the attachments, create enough rope? RE: Like a beam+whip? - josemendez - 08-01-2021 (08-01-2021, 02:00 PM)dakom Wrote: Thanks. One thing I didn't quite understand from playing around is how to generate the rope.. e.g. let's say there's different targets at 100 units away and 200 units away... Is there a way to generate the rope from that inverse of the target? Like given two transforms that will _eventually_ be the attachments, create enough rope? Sure, you just have to create the rope blueprint at runtime. Use the two transforms to define a path for the rope, then call Generate() on the blueprint. You have examples on runtime actor creation in the manual: http://obi.virtualmethodstudio.com/tutorials/scriptingactors.html You can also create the solver, updater, and all other required components at runtime if needed. There's also a basic example of this included with the asset, see the RopeGrapplingHook sample scene. |