Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Help  Creating a bungee jumping rope
#4
Hi!

(29-08-2022, 01:46 PM)HazarS Wrote: I meant since the character weight and platform height will be set randomly, the rope's starting and stretched length should be as it is expected for all the possible weight-height combinations. 

I don't quite get why you're changing the rope's rest length using a cursor then. Bungee coords have a fixed rest length (that is, if you measure the rope without stretching it). The rope will stretch a different amount depending on platform height and character weight, as well as the rope's compliance (elasticity). This is automatically simulated by Obi, you don't need to do any special calculations on your part for this to happen.

If you hang an object from a rope, the rope will stretch more or less depending on the difference in mass between the object and the rope. This is also affected by the object's falling speed.

(29-08-2022, 01:46 PM)HazarS Wrote: But now I have another question. I'm placing the rope in different positions (just the position.y changes randomly). However, the path doesn't change and it creates some problems as you can imagine because the path stays at the same position that I placed it in the scene view. Could you please help me with that?

The blueprint path is just an asset that determines the rope's initial shape and length, it does not have a position/orientation in the scene. At runtime, the rope is instantiated at its transform's position and rotation, once it's instantiated it will move independently from the transform (for an obvious reason: a transform determines a single position/orientation in space, but different parts of a rope can be at different positions / orientations so it can't be expressed as a single transform).

So you have two options: either instantiate the rope after setting its transform, or use rope.Teleport() to teleport the entire rope to a new location after instantiating it.
Reply


Messages In This Thread
Creating a bungee jumping rope - by HazarS - 27-08-2022, 09:32 PM
RE: Creating a bungee jumping rope - by HazarS - 29-08-2022, 01:46 PM
RE: Creating a bungee jumping rope - by josemendez - 29-08-2022, 03:58 PM
RE: Creating a bungee jumping rope - by HazarS - 30-08-2022, 01:34 PM