Swift SKPhysics Node flying without resistance

61 views Asked by At

I want a node to fly and behave like it has no resistance. I thought I can make the node "massless" and "frictionless" so that I can apply an Impulse and the node will never stop flying around.

physicsBody?.allowsRotation     =   false  
physicsBody?.isDynamic          =   true  
physicsBody?.affectedByGravity  =   false  
physicsBody?.mass               =   0  
physicsBody?.linearDamping      =   1  
physicsBody?.restitution        =   1  
physicsBody?.angularDamping     =   0  
physicsBody?.angularVelocity    =   1  
physicsBody?.density            =   0  
physicsBody?.friction           =   0

As I saw that the node flies longer but will stop nevertheless, I applied an Impulse to the node permanently with the update function (what I hope to avoid in the end solution).
The problem now is, that after the first collision the node hasn't the right orientation to rebound rightly at the next collisions. And if I allow the node to rotate, the node will rotate wildly...

Thats the Node(s) how I want them to behave

0

There are 0 answers