简体   繁体   中英

How can I draw a curve between two points in ARKit with Xcode?

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 ar我想要实现的目标的简短演示

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...).

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM