How to make a free falling sprite node sit on another horizontally moving sprite body?
Now the both both bodies collide. But the horizontal moving body is deviated from its path and free falling body goes down after hitting horizontal body. How can fix this changing settings of the sprite nodes.
I have made given collision and category bit mask for collision to happen correctly.
freefalling body properties:
- affectedbygravity = YES dynamic = YES allowsrotation = NO usesprecisecollisiondetection = YES restitution = 1 friction = 1.0 angulardamping = 0.0 lineardamping = 0.0
horizontal moving body properties
dynamic = YES affectedbyGravity = NO friction = 1.0
an oscillation action is performed on this body.
fallingNode.physicsBody?.mass
– rakeshbs