0
votes

I'm developing an app that helps in throwing paper waste in dustbin.

How do I draw a curve between two points in AR world?

I'm using Xcode and ARKit. Any help will be greatly appreciated.

UPDATE: See the image below, the curve shown in white dotted line is what I want to achieve in arA brief demo of what I want to achieve

1

1 Answers

0
votes

This has nothing to do with ARKit, it is a pure SceneKit question. You need to apply Physics Simulation to the paper ball you are throwing.

You then use the function applyForce(_:asImpulse:) to throw the ball. The curve will be a result of the force applied and gravity of the scene.

The ball will have a SCNPhysicsBodyType.dynamic and the rest of the scene can have SCNPhysicsBodyType.static as they don't move (floor, bin , desk, etc...).