0 votes

hi guys,
i'm trying to make a wrap around object (rigidbody) and followed the last example (asteroid) in this link (kids
can code)
and ok it's works using integrateforces().

i added a rope as child of main object and when object wrap the rope don't follow main object and mess all the physics and movement.

any idea/help what's wrong?

thanks for your help.

Godot version 3.2.3
in Engine by (20 points)

2 Answers

0 votes

any help/suggestion ?

by (20 points)
0 votes

i'm going crazy... i don't know if is my fault (for sure) or a godot bug
i'm tryng to port to godot an old game i published some years ago using gideros... "GidHelix"

here is the video of my problem...
youtube link

if i remove the rope all work fine...

for wrap helix i used

func _integrate_forces(state: Physics2DDirectBodyState)->void:
var xform = state.get_transform()

if xform.origin.x > screen_w + helix_half_width:
    xform.origin.x = -helix_half_width

if xform.origin.x < -helix_half_width:
    xform.origin.x = screen_w + helix_half_width

state.set_transform(xform)

it seems that attached rope don't follow parent helix...

any ideas?

by (20 points)
Welcome to Godot Engine Q&A, where you can ask questions and receive answers from other members of the community.

Please make sure to read How to use this Q&A? before posting your first questions.
Social login is currently unavailable. If you've previously logged in with a Facebook or GitHub account, use the I forgot my password link in the login box to set a password for your account. If you still can't access your account, send an email to webmaster@godotengine.org with your username.

Categories