Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Like a beam+whip?
#1
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?
Reply
#2
(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. 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?

1.- Use attachments: http://obi.virtualmethodstudio.com/tutor...ments.html

2.- Use collision callbacks to detect the collision: http://obi.virtualmethodstudio.com/tutor...sions.html
Then use either attachments or the particle API to hold the particle in place: http://obi.virtualmethodstudio.com/tutor...icles.html

3.- Wiggling will work automatically once both ends are attached to something.

let me know if you need further guidance. cheers!
Reply
#3
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?
Reply
#4
(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/tutor...ctors.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.
Reply