Posts: 30
Threads: 7
Joined: Nov 2022
Reputation:
0
25-11-2022, 02:53 PM
(This post was last modified: 25-11-2022, 03:04 PM by Milionario.)
https://gyazo.com/7c9433194bf9dece501a74a62e9061fc
See this gif, see how the capsule rotates on its own, I want both the rope and the capsule affect eachother's rotations, so I think the correct way to say this is that I would expect the capsule to look at where that point in the rope is looking?
Also, i have a grabbing system that requires colliders and rigidbodies, so the player can grab physics objects on the scene, is it possible to make the entire rope be grabbable and interactable with 2 way coupling?
Posts: 6,326
Threads: 24
Joined: Jun 2017
Reputation:
400
Obi Owner:
25-11-2022, 03:26 PM
(This post was last modified: 25-11-2022, 03:27 PM by josemendez.)
(25-11-2022, 02:53 PM)Milionario Wrote: https://gyazo.com/7c9433194bf9dece501a74a62e9061fc
See this gif, see how the capsule rotates on its own, I want both the rope and the capsule affect eachother's rotations, so I think the correct way to say this is that I would expect the capsule to look at where that point in the rope is looking?
An object has 3 rotational degrees of freedom when attached to 1 point, but only 1 degree of freedom when attached to 2 points (can only rotate around the line that passes trough both points). So the correct solution is to attach 2 control points instead of just one.
You can see an example of this in the RopeShowcase sample scene, the ropes at the left are kept perpendicular to the wall by attaching 2 points.
if you require simulating and constraining all 3 rotational DOFs (including torsion), then you should use a rod instead of a rope. See: http://obi.virtualmethodstudio.com/manua...setup.html
(25-11-2022, 02:53 PM)Milionario Wrote: Also, i have a grabbing system that requires colliders and rigidbodies, so the player can grab physics objects on the scene, is it possible to make the entire rope be grabbable and interactable with 2 way coupling?
Nope, I wouldn't recommend doing that. The proper solution for this is to grab the particles themselves. There's many ways you can do this, I can point you in the right direction: how does your current rigidbody-based grabbing system work?
Posts: 30
Threads: 7
Joined: Nov 2022
Reputation:
0
25-11-2022, 03:35 PM
(This post was last modified: 25-11-2022, 03:40 PM by Milionario.)
(25-11-2022, 03:26 PM)josemendez Wrote: An object has 3 rotational degrees of freedom when attached to 1 point, but only 1 degree of freedom when attached to 2 points (can only rotate around the line that passes trough both points). So the correct solution is to attach 2 control points instead of just one.
You can see an example of this in the RopeShowcase sample scene, the ropes at the left are kept perpendicular to the wall by attaching 2 points.
if you require simulating and constraining all 3 rotational DOFs (including torsion), then you should use a rod instead of a rope. See: http://obi.virtualmethodstudio.com/manua...setup.html
Nope, I wouldn't recommend doing that. The proper solution for this is to grab the particles themselves. There's many ways you can do this, I can point you in the right direction: how does your current rigidbody-based grabbing system work?
The 2 control point attachment worked exactly how i wanted, thanks!
So, on the basic level, on the final attach part, which is what i think you are interested on, is that, after placing the hands at the attach position, I attach the hand rigidbodies of the player character, to the rigidbody of the grabbable object by a fixed or configurable joint.
Posts: 6,326
Threads: 24
Joined: Jun 2017
Reputation:
400
Obi Owner:
(25-11-2022, 03:35 PM)Milionario Wrote: So, on the basic level, on the final attach part, which is what i think you are interested on, is that, after placing the hands at the attach position, I attach the hand rigidbodies of the player character, to the rigidbody of the grabbable object by a fixed or configurable joint.
In this case, it's best to create pin constraints dynamically when the hands are in the attach position. These constraints are what attachments use internally, and are the equivalent of a fixed joint for rigidbodies. See the very end of "scripting constraints" in the manual for some sample code on how to create a pin constraint at runtime:
http://obi.virtualmethodstudio.com/manua...aints.html
kind regards,
|