-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add a demo project #1
Comments
@Felizolinha can't get it to work how? What's happening for you? |
The nodes simply stay on top of each other. I made them draggable to help me understand what was happening and, after dragging, they at least move slowly to the center, but still get on top of each other. Also, the nodes seem to only push some of the other nodes, not all of them. |
@Felizolinha It might be that the centering force is overpowering the charge on each node. I'll get you the values I'm currently using later today. |
@Felizolinha I do: node.physicsBody = SKPhysicsBody(circleOfRadius: 100.0)
node.physicsBody?.isDynamic = true
node.physicsBody?.affectedByGravity = true
node.physicsBody?.charge = 5.5
node.physicsBody?.linearDamping = 1.3 let spring = SKPhysicsJointSpring.joint(withBodyA: srcNode.physicsBody!, bodyB: destNode.physicsBody!, anchorA: srcNode.position, anchorB: destNode.position)
spring.damping = 10.0
spring.frequency = 3.00 and
|
Unfortunately this didn't solve the issue, the problem persists :/ |
It's a delicate balance between the charge and the centeringStrength. Have you tried no centering? (set |
Would it be possible to share a demo project with the scene? @knightcode |
A demo project would be really useful to understand how to use the pod. I did all the steps on the README and I still can't make it work :/
The text was updated successfully, but these errors were encountered: