Using swift, I try to make SKSpriteNode(which does not have a physical body) follow another SKSpriteNode that has a physical body. I want this to be done when there is contact between the sprite with the physical body and another physical body. I read about tuning SKContsraints, but they have a range and often drop out or change. I want the sprite to be respected exactly. How can I do that?
SKSpriteNode
SKSpriteNod
SKContsraints
Make sure your scene is SKPhysicsContactDelegate. Then put this in your didBeginContact () method.
nodeWithoutPhysicsbody.position = nodeWithPhysicsbody.position
, node node , .
Source: https://habr.com/ru/post/1607875/More articles:problem when combining python list and numpy array? - pythonAnimating new items in TableView - androidMongoDB and upsert problem - javaSend silent push notifications to the app, update location and send to server in background - iosUsing MongoDB FirstFirst Method - mongodbASP.NET MVC5 removes html response for API errors - c #Returning eloquent relationships depending on the field value in the model - phpHow to implement firebase server-side protection - javascriptHTML text input conditional submit - javascriptcomparison if void * contains 0 numbytes? - cAll Articles