Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Climbing on rope and fix to move only on x, y
#9
I will try it tomorrow.
So basically this the first and last particle index of a rope?

private int GetFirstParticleIndex() => _rope.elements[0].particle1;

private int GetLastParticleIndex() => _rope.elements[_rope.elements.Count - 1].particle1;

I created a climb on obi rope video:

https://www.youtube.com/watch?v=XKSBt3euyxY


Can you help me how to improve? Now it is very ugly Gran sonrisa
I want something like in the Inside game... So basically if the player's foot collide with a particle then the particle attach to the player's foot and that elements between the hands + feet now moving just stay straight somehow. I tried adding to that colliding particle a fixed position but I don't know how to to that.


Also I noticed that the positions is not the ral world positions, so I added the solver's transform position to it, to get the world position.
+1: What is the Vector4 w value? Is it a big probelem is I just add a "0" to it?

public static class Vector4Utils
{
    public static Vector3 ToVector3(this Vector4 v) => new Vector3(v.x, v.y, v.z);
}

public static class Vector3Utils
{
    public static Vector4 ToVector4(this Vector3 v) => new Vector4(v.x, v.y, v.z, 0);
}


Thanks!
Reply


Messages In This Thread
RE: Climbing on rope and fix to move only on x, y - by lacasrac - 05-10-2021, 09:26 PM