Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Use to simulate a hose in 3thr person
#7
(31-10-2022, 02:16 PM)MEPETAMINALS Wrote: Hi, not op, but I've done something with a lot of similarity in my project. Where ropes are connected to rigidbodies, and the player can 'pick up' one end of the rope, and drag it around the scene, attaching to objects and towing/manipulating any connected bodies.

The basic setup to this involves the following:

At either end of the rope (though in your case likely only the 'nozzle' end would need this) there is an object with rigidbody, collider, obi rigidbody, obi collider. This is the object the player will interact with.

Between this object(s) and the source of the rope, I add the rope. This is created along the standard tutorial means. Each end will be connected to the interaction objects (nozzle, spool) with an Obi particle attachment point, make sure the source is aligned to the correct point on the spline or things will get interesting. If the end is to be interacted with, you will need at least this ends particle attachment point to be dynamic. You will likely also want an Obi Cursor on the rope to programmatically handle unwinding/winding of the rope.

Lastly the player is a rigidbody that can 'pick up' any of the ends and perform any functions supplied to that rigidbody. The rope itself is basically along for the ride at that point. Just make sure the motions of both the player and the held object are handled through forces rather than directly set, otherwise things will get really floppy and stretchy.

Hi Claudio,
thank you so much for the detailed answer.
The player controller rigidbody thing will still be exciting :-) Currently I use the Unity Starter Asset First Person Controller which is not physical. Looks like I will need to make my own controllers anyway at some point, also for other reasons. But not sure if it is a good idea to make the player a rididbody in general (could cause more trouble than it solves). We will see.
Otherwise, I will investigate in the possibility to somehow get the tension of the rope via code and disable player movement in the repsective direction when the hose is tight.
Reply


Messages In This Thread
RE: Use to simulate a hose in 3thr person - by MarieGrasmeier - 31-10-2022, 03:42 PM