Hi guys,
I've read many articles and the documentation in order to get the RigidBody2D to do what i want.
How is it possible to create a magnetic field like in a breakout game?
I get my ball stuck on the paddle and I can release it, but when my ball is stuck, i can't move my paddle OR my ball doesn't move with my paddle...
""
if body.getname() == "Player" and Input.isactionpressed("debugkey"):
emitsignal("clicked", self)
mode = RigidBody2D.MODESTATIC
held = true
if held:
globaltransform.origin = body.getnode("Anchor").getglobalposition()
if Input.isactionpressed("goball"):
held = false
mode = RigidBody2D.MODECHARACTER
setlinearvelocity(velocity)
""
And my ball only get centered on my paddle with:
""
globaltransform.origin = body.getnode("Anchor").getglobalposition()
""
I want my ball stuck at the Position who it enters
Thanks a lot