Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
How to create and destroy particles procedurally?
#1
I would like to know how can I increase and decrease the length of an inextensible rope.

As far as I can see, the best method to do that is increasing (or decreasing) the number of particles in my rope (pressing two diferent keys, such as up and down keys). Since i'm beginner with Obi, I really don't know if this is the best way to do that and I'm opened to other suggestions.

Thanks in advance Gran sonrisa
Reply
#2
(29-06-2017, 08:42 PM)Pr0fitt3R Wrote: I would like to know how can I increase and decrease the length of an inextensible rope.

As far as I can see, the best method to do that is increasing (or decreasing) the number of particles in my rope (pressing two diferent keys, such as up and down keys). Since i'm beginner with Obi, I really don't know if this is the best way to do that and I'm opened to other suggestions.

Thanks in advance  Gran sonrisa

Hi! You can just use the ObiRopeCursor component. Check out the "Crane" sample scene, as it does exactly what you ask for.

Rope allocates an extra amount of particles upon initialization (controllable via the "pooled particles" variable in the inspector), that can be used to lengthen the rope at runtime by this component.

The cursor's "normalized coord" determines where along the rope will particles be added/removed. The "direction" boolean determines in which direction (towards the start or the end) are particles added or removed.

By calling the cursor's ChangeLenght method, you can set a new length for your rope. Check out CraneController.cs for an example on how to do this using the keyboard.
Reply
#3
(01-07-2017, 12:56 PM)josemendez Wrote: Hi! You can just use the ObiRopeCursor component. Check out the "Crane" sample scene, as it does exactly what you ask for.

Rope allocates an extra amount of particles upon initialization (controllable via the "pooled particles" variable in the inspector), that can be used to lengthen the rope at runtime by this component.

The cursor's "normalized coord" determines where along the rope will particles be added/removed. The "direction" boolean determines in which direction (towards the start or the end) are particles added or removed.

By calling the cursor's ChangeLenght method, you can set a new length for your rope. Check out CraneController.cs for an example on how to do this using the keyboard.

I'll try to follow your tips! Thanks a lot, Jose!  Gran sonrisa
Reply