Posts: 9
Threads: 4
Joined: Jun 2019
Reputation:
0
27-02-2020, 07:20 AM
(This post was last modified: 27-02-2020, 07:23 AM by ab8228657.)
How do i add(use) or remove constraints arbitrarily on each particle in runtime
With path. AddControlPoint () then use ObiParticleAttachment. ParticleGroup. Name and ObiParticleAttachment target ????
Please help me guys.
Posts: 6,346
Threads: 24
Joined: Jun 2017
Reputation:
400
Obi Owner:
(27-02-2020, 07:20 AM)ab8228657 Wrote: How do i add(use) or remove constraints arbitrarily on each particle in runtime
With path. AddControlPoint () then use ObiParticleAttachment. ParticleGroup. Name and ObiParticleAttachment target ????
Please help me guys.
Hi,
Sorry, I don't understand your question. The three things you mention are basically unrelated. AddControlPoint() adds a new point to the rope's path. ParticleGroup.name is the name of a particle group (a string). The target of a ObiParticleAttachment is a transform.
Do you mean how to add distance/bend/some other constraints at runtime? or how to add an attachment at runtime?
Posts: 9
Threads: 4
Joined: Jun 2019
Reputation:
0
(27-02-2020, 10:17 AM)josemendez Wrote: Hi,
Sorry, I don't understand your question. The three things you mention are basically unrelated. AddControlPoint() adds a new point to the rope's path. ParticleGroup.name is the name of a particle group (a string). The target of a ObiParticleAttachment is a transform.
Do you mean how to add distance/bend/some other constraints at runtime? or how to add an attachment at runtime?
I wanted to create an effect like this video, where the feet of the character can create a constraint on any part of the rope, whether it's the rocking of the character or the climbing of the net.
Posts: 6,346
Threads: 24
Joined: Jun 2017
Reputation:
400
Obi Owner:
27-02-2020, 01:02 PM
(This post was last modified: 27-02-2020, 01:03 PM by josemendez.)
(27-02-2020, 12:56 PM)ab8228657 Wrote: I wanted to create an effect like this video, where the feet of the character can create a constraint on any part of the rope, whether it's the rocking of the character or the climbing of the net.
Hi,
The rope in that video is not made by adding "constraints" by the feet/hands, like you seem to assume. It's quite noticeable it has 3 different parts:
- a single spring constraint between the hands and the top of the rope
- a straight, physics-less section between the hands and the feet
- and a particle-based rope from the feet down.
You'll need to build a wrapper class that keeps track of the entire rope length, and adapts the length of the spring and the particle section based on where the character is positioned along the entire rope.
Posts: 9
Threads: 4
Joined: Jun 2019
Reputation:
0
(27-02-2020, 01:02 PM)josemendez Wrote: Hi,
The rope in that video is not made by adding "constraints" by the feet/hands, like you seem to assume. It's quite noticeable it has 3 different parts:
- a single spring constraint between the hands and the top of the rope
- a straight, physics-less section between the hands and the feet
- and a particle-based rope from the feet down.
You'll need to build a wrapper class that keeps track of the entire rope length, and adapts the length of the spring and the particle section based on where the character is positioned along the entire rope.
That's great, but how do you create spring using obi?
Posts: 6,346
Threads: 24
Joined: Jun 2017
Reputation:
400
Obi Owner:
(27-02-2020, 02:20 PM)ab8228657 Wrote: That's great, but how do you create spring using obi?
Unity already implements springs:
https://docs.unity3d.com/Manual/class-SpringJoint.html
Posts: 9
Threads: 4
Joined: Jun 2019
Reputation:
0
(27-02-2020, 03:00 PM)josemendez Wrote: Unity already implements springs:
https://docs.unity3d.com/Manual/class-SpringJoint.html
thanks very much。
I think it's exactly the same as what you said when the character swings, but when I climb, I see that the rope is not completely connected to the foot. If the upper part of the hand is a string and the lower part is an obi rope, how can the lower part of the rope in the video be made to wave and sway with the foot
Posts: 6,346
Threads: 24
Joined: Jun 2017
Reputation:
400
Obi Owner:
(27-02-2020, 05:53 PM)ab8228657 Wrote: thanks very much。
I think it's exactly the same as what you said when the character swings, but when I climb, I see that the rope is not completely connected to the foot. If the upper part of the hand is a string and the lower part is an obi rope, how can the lower part of the rope in the video be made to wave and sway with the foot
Hi,
You can use a particle attachment for that:
http://obi.virtualmethodstudio.com/tutor...ments.html
Together with a rope cursor placed right after the attached particle, you can control the length of the rope while one end is attached to the character's foot.
Posts: 9
Threads: 4
Joined: Jun 2019
Reputation:
0
(27-02-2020, 06:27 PM)josemendez Wrote: Hi,
You can use a particle attachment for that:
http://obi.virtualmethodstudio.com/tutor...ments.html
Together with a rope cursor placed right after the attached particle, you can control the length of the rope while one end is attached to the character's foot.
Hi,
Sir, I tried to make the people climbing the rope with rope cursor, at the time of character not to climb the rope the rope is in natural state, how should I to obi rope and spring to be to combine, my idea was a natural state all use obi rope, waiting for the man grabbed the rope, obi rope according to the position of the character to shorten or add it to the bottom of the particles, just like the way you said the same.However, there is a problem. If the character climbs from the bottom of the rope, using rope cursor is theoretically ok, but if the character jumps from the air and grabs the middle of the rope, using rope cursor to instantly shorten or increase the length of the rope to the character's feet, the rope will jump or tremble violently.
I also used an easier method to see in my video below, I tied the character's hand IK to each of the spacer particles on the string.However, the problem lies in how to use the particle attachment to constrain particles at different positions on the rope during the time interval of the character's foot animation.Please help me analyze it.
Posts: 30
Threads: 9
Joined: Jul 2023
Reputation:
0
(01-03-2020, 02:28 AM)ab8228657 Wrote: Hi,
Sir, I tried to make the people climbing the rope with rope cursor, at the time of character not to climb the rope the rope is in natural state, how should I to obi rope and spring to be to combine, my idea was a natural state all use obi rope, waiting for the man grabbed the rope, obi rope according to the position of the character to shorten or add it to the bottom of the particles, just like the way you said the same.However, there is a problem. If the character climbs from the bottom of the rope, using rope cursor is theoretically ok, but if the character jumps from the air and grabs the middle of the rope, using rope cursor to instantly shorten or increase the length of the rope to the character's feet, the rope will jump or tremble violently.
I also used an easier method to see in my video below, I tied the character's hand IK to each of the spacer particles on the string.However, the problem lies in how to use the particle attachment to constrain particles at different positions on the rope during the time interval of the character's foot animation.Please help me analyze it.
the question above is still valid
|