Section of a rope.
More...
|
bool | usedFixedPosition |
| If true, the rope will not be climable but instead be a fixed point to which the character is attached. More...
|
|
◆ GetCharacterPositionForPosition() [1/2]
virtual Vector2 PlatformerPro.RopeSection.GetCharacterPositionForPosition |
( |
float |
position | ) |
|
|
virtual |
Gets the position in world space the character should be based on how far up the rope section they are.
- Returns
- The center for position.
- Parameters
-
characterPosition | Characters grab position. |
Reimplemented in PlatformerPro.RopeAnchor.
◆ GetCharacterPositionForPosition() [2/2]
virtual Vector2 PlatformerPro.RopeSection.GetCharacterPositionForPosition |
( |
float |
position, |
|
|
float |
handOffset |
|
) |
| |
|
virtual |
Gets the position in world space the character should be based on how far up the rope section they are.
- Returns
- The center for position.
- Parameters
-
characterPosition | Characters grab position. |
characterPosition | Offset from characters center and their grab (usually hand) position. |
Reimplemented in PlatformerPro.RopeAnchor.
◆ GetCharacterRotationForPosition()
virtual float PlatformerPro.RopeSection.GetCharacterRotationForPosition |
( |
float |
position, |
|
|
float |
handOffset |
|
) |
| |
|
virtual |
Gets the rotation (in eueler z degrees) for the given rope position.
- Returns
- The center for position.
- Parameters
-
characterPosition | Characters grab position. |
characterPosition | Offset from characters center and their grab (usually hand) position. |
Reimplemented in PlatformerPro.RopeAnchor.
◆ GetPositionForCharacterPosition()
virtual float PlatformerPro.RopeSection.GetPositionForCharacterPosition |
( |
Vector2 |
position | ) |
|
|
virtual |
Gets how far up the rope section (0 at bottom, 1 at top) a character is.
- Returns
- The center for position.
- Parameters
-
characterPosition | Characters grab position. |
Reimplemented in PlatformerPro.RopeAnchor.
◆ Init()
virtual void PlatformerPro.RopeSection.Init |
( |
| ) |
|
|
protectedvirtual |
◆ myCollider
BoxCollider2D PlatformerPro.RopeSection.myCollider |
|
protected |
The box collider for this rope section.
◆ rope
Rope PlatformerPro.RopeSection.rope |
|
protected |
◆ usedFixedPosition
bool PlatformerPro.RopeSection.usedFixedPosition |
If true, the rope will not be climable but instead be a fixed point to which the character is attached.
◆ Length
virtual float PlatformerPro.RopeSection.Length |
|
get |
Get the rope section length.
The length.
◆ Rope
virtual Rope PlatformerPro.RopeSection.Rope |
|
get |
Gets the rope that owns this rope section.
The rope.
◆ SectionAbove
virtual RopeSection PlatformerPro.RopeSection.SectionAbove |
|
get |
Gets the rope section above this one.
◆ SectionBelow
virtual RopeSection PlatformerPro.RopeSection.SectionBelow |
|
get |
Gets the rope section below this one.
The documentation for this class was generated from the following file:
- D:/Projects/platformer-pro-2019.3/Assets/PlatformerPro/Scripts/Movement/Climbing/RopeSection.cs