How to make sprite sit on a moving sprite

后端 未结 4 1889
暗喜
暗喜 2021-01-22 04:19

How to make a sprite sit on a moving sprite and travel with it. I have made the red box jump with impulse and when it falls on the black block down which is moving, the red box

4条回答
  •  悲哀的现实
    2021-01-22 05:10

    Try redBox.physicsBody.allowsRotation = NO,

    A Boolean value that indicates whether the physics body is affected by angular forces and impulses applied to it.

    And adjust redBox.physicsBody.restitution between 0.0 to 1.0,

    The bounciness of the physics body.

提交回复
热议问题