Coder Social home page Coder Social logo

Comments (5)

youle31 avatar youle31 commented on June 16, 2024

Hi, you can try to move pre_draw callback execution from KX_KetsjiEngine::RenderCameras to KX_Scene::RenderAfterCameraSetup and test. If it works for you, i'm ok to move it here.

from upbge.

opheroth avatar opheroth commented on June 16, 2024

Hi, I've tried moving it to different zones inside KX_Scene::RenderAfterCameraSetup, but the problem is still there. Setting a location works, but reading it, doesn't.

from upbge.

opheroth avatar opheroth commented on June 16, 2024

Doing some tests, seems like moving the object works, but reading the position of the controllers, could be happening before the scripts, and even if the navigation location changes, the controller position is not updated to the new navigation location until the next frame. I've printed the controller location, and the sphere location, and they're at the same position at the moment of running the script, for now it can be semi-fixed calculating the previous location of the navigation location - actual navigation location, then that vector can be added to the controller location, but the rotation still gets delayed, is less noticeable, but still there.
Edit: Forgot to mention that the calculation is done in python, not in the source code.

I'm still trying to find when are updated the values for controllers are. I would appreciate if you have a hint on where or how to fix it correctly.

from upbge.

youle31 avatar youle31 commented on June 16, 2024

You can look at KX_Scene, and search for "wm_xr" occurences. I haven't an XR device, and idk how to deal with that. You can try to move what is in KX_Scene... I won't be abled to review, but you can ask BluePrintRandom on discord to test what you did if you have a change proposal.

from upbge.

opheroth avatar opheroth commented on June 16, 2024

Thanks, I've made that and moved the callback section after the xr part in KH_Scene, but as mentioned, it seems it read the transformations, then the callback move the navigation_location, and if I read the controller location, it didn't updates, and reads the location before the navigation location change. If I find something I'll go to the discord channel and ask BluePrintRandom as you suggested. Thanks again.

from upbge.

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.