Anchor on Rope Swinging sample #40
Replies: 2 comments 1 reply
-
The reason why it doesn't work is that But you're on the right track. You can set func _ready() -> void:
rope_interaction.get_anchor().apply_angle = true
func _physics_process(delta: float) -> void:
sprite.global_rotation = rope_interaction.get_anchor().global_rotation |
Beta Was this translation helpful? Give feedback.
-
|
Closing this as completed. If you still have questions, feel free to ask. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Hello.
Thank you so much for this tool, it's amazing. I would like to know something.
I want to replicate the situation I see on the Rope Swinging sample scene, with a caveat: the player sprite must have an anchor where its rotation follows the rope. In other words, I would like the sprite would behave like the RopeAnchor2 sprite in the Anchors sample.
I assume this is done by setting, in the _create_default_anchor method, in the RopeInteraction class a line "anchor.apply_angle = true"? I tried to do this, but it doesn't work. Am I doing something wrong?
Best regards,
Arthur
Beta Was this translation helpful? Give feedback.
All reactions