Skip to content

Reality-Dev/RealityKit-Path-Maker

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

RKPath

This package makes it easy to generate paths in RealityKit. There is an example project included in this repo to show you how to use it. After you add the swift package and import RKPath,

  1. Initialize a new path entity like this:
     var pathEntity = RKPathEntity(arView: arView)

or like this:

     var pathEntity = RKPathEntity(arView: arView,
                                     path: [],
                                     width: 0.35,
                                     materials: [UnlitMaterial.init(color: .blue)])

Your entity will automatically add itself to the scene.

  1. Add points to your path (or change the pathPoints array however you want) and it will automatically update:
        let myNewPoint = SIMD3<Float>()
        self.pathEntity.pathPoints.append(myNewPoint)

About

Create paths for your apps using just an array of points.

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages