Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
How to dynamically change ObiPinhole position?
#1
Pregunta 
Hello, 

I'm working on creating a rope whose length is controlled by an ObiCursor. When the player grabs the rope using a pinhole, the pinhole's position doesn't seem to follow the rope at all as its length changes. Is there a way to make the pinhole stays in the right position relative to the rope length?

Kind regards,
Reply
#2
(03-07-2025, 10:29 AM)quent_1982 Wrote: Hello, 

I'm working on creating a rope whose length is controlled by an ObiCursor. When the player grabs the rope using a pinhole, the pinhole's position doesn't seem to follow the rope at all as its length changes. Is there a way to make the pinhole stays in the right position relative to the rope length?

Kind regards,

Hi!

You can set the position along the rope using pinhole.position. This is a normalized coordinate that runs from 0 (start of the rope) to 1 (end of the rope).

See the VineClimbController sample script used in the VineSwinging sample scene, it sets the pinhole position to attach the character to a new position along the vine.

kind regards,
Reply
#3
(Yesterday, 09:46 AM)josemendez Wrote: Hi!

You can set the position along the rope using pinhole.position. This is a normalized coordinate that runs from 0 (start of the rope) to 1 (end of the rope).

See the VineClimbController sample script used in the VineSwinging sample scene, it sets the pinhole position to attach the character to a new position along the vine.

kind regards,

Hello,

Let me be more specific, I've already implement VineSwinging example to my player, except the change position because I do not need it in a sample's way.
So when the grabbed rope length is overridden by ObiCursor and ObiCursor is changing the rope's length, the position on the pinhole is not changing with rope length, that causing bugs when ObiPinhole is reach value that doesn't contains rope anymore. So is there a way to set ObiPinhole position dynamically without visual bugs or even physical bugs related to ObiCursor length changing?

Kind regards,
Reply