Giter VIP home page Giter VIP logo

Comments (5)

bergenrothn97 avatar bergenrothn97 commented on June 8, 2024 1

Nevermind, figured it out. Turns out I had a camera node in my scn file and ARVideoKit was taking video from that point.

from arvideokit.

AFathi avatar AFathi commented on June 8, 2024

@avierkant, can you please specify what device you're using?

It would also be great if you add snippet of the code in order for me to recreate the issue.

from arvideokit.

avierkant avatar avierkant commented on June 8, 2024

@AFathi Running on an iPhone 8 Plus

Here's what I'm using to fetch user position, and the function that calls it:

func getUserVector() -> (SCNVector3, SCNVector3) { // (direction, position)

        if let frame = sceneView.session.currentFrame {
    
        let mat = SCNMatrix4(frame.camera.transform)
        let dir = SCNVector3(0, frame.camera.eulerAngles.y, 0)
        let pos = SCNVector3(mat.m41, mat.m42, mat.m43) 
        return (dir, pos)
    }
    return (SCNVector3(0, 0, 0), SCNVector3(0, 0, -0.2))
}

func addRandom() {
    
    let rand01 = SCNNode()
    rand01.geometry = SCNPlane(width: 2, height: 2)
    let randomSelection = arc4random_uniform(213)
    rand01.geometry?.firstMaterial?.diffuse.contents = UIImage(named: "\(randomSelection).png")
    rand01.geometry?.firstMaterial?.isDoubleSided = true
    let (direction, position) = getUserVector()
    rand01.position = position
    let rand01Rotation = direction
    rand01.eulerAngles = rand01Rotation

    self.sceneView.scene.rootNode.addChildNode(rand01)

    
}

from arvideokit.

raulbude avatar raulbude commented on June 8, 2024

I am experiencing the same problem.

from arvideokit.

bergenrothn97 avatar bergenrothn97 commented on June 8, 2024

My videos are recorded differently than what they are on the screen. My text nodes are oriented differently in the recorded movie than they are in the ARKit SceneView. Can you help?

from arvideokit.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.