Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Dragging the edge of a rope
#3
(22-12-2021, 12:08 PM)josemendez Wrote: Hi there!

Blueprints are assets -just like textures, audio, animations or meshes, all stored in disk- that are used to generate a rope at runtime. They behave like prefabs: once the rope is instantiated from the blueprint, it is no longer tied to it. So modifying the blueprint will A) modify the blueprint permanently, since it's stored in disk, not memory B) have no effect on existing ropes at runtime.

Think of blueprints as a "mold" for making plastic figures: if you pour molten plastic on the mold, make a figure with it and afterwards modify the mold, the figure you've already created will remain unchanged. Changes to the mold will only affect figures you create from that point on.

See the "architecture" page of the manual for details: http://obi.virtualmethodstudio.com/manua...cture.html

If you want to drag the rope around, you need to move the rope itself, not the blueprint. Ropes -like any object in Obi- are made of particles, hence you want to use the particle API to modify them:
http://obi.virtualmethodstudio.com/manua...icles.html

You might want to try the utility ObiParticleDragger component. It uses the particle API to for a basic implementation of mouse-based click and drag. You can either use the component as-is if it meets your needs, or use it as a basis to build custom interaction.


Thank you Jose, this is very helpful.

I was able to make this work according to your advice, and I was also able to hook to a "ripping" even I made in which I'd like the rope to follow the mouse cursor.

My idea was to make it follow the mouse by changing one of the Particle Attachments to a Transform that is moving in the scene according to the mouse position. I got it partially working, but the issue is that while the rope is moving according to this moving transform, it's not really connected to it, there's quite a significant margin for it's connection. Shouldn't the rope actually connect to that transform?

See a video that shows the current behavior:

https://drive.google.com/file/d/1qjAzto0...sp=sharing

Thanks!
Reply


Messages In This Thread
Dragging the edge of a rope - by Sanppy - 22-12-2021, 12:00 PM
RE: Dragging the edge of a rope - by josemendez - 22-12-2021, 12:08 PM
RE: Dragging the edge of a rope - by Sanppy - 22-12-2021, 04:45 PM
RE: Dragging the edge of a rope - by Sanppy - 23-12-2021, 04:42 PM
RE: Dragging the edge of a rope - by Sanppy - 23-12-2021, 06:32 PM