Giter Site home page Giter Site logo

Comments (4)

dad72 avatar dad72 commented on August 12, 2024 1

Ok, I updated to the latest version. I took the liberty of rewriting the class in jS ES6.
Everything works with the update.

Thanks Ssatguru

from babylonjs-charactercontroller.

ssatguru avatar ssatguru commented on August 12, 2024

Hi @dad72 ,
In mode 0 the camera controls the rotation of the avatar and is also controlled by rotation of avatar.
Try mode 1 and see what happens.
To Change mode

from babylonjs-charactercontroller.

dad72 avatar dad72 commented on August 12, 2024

I don't use isometric. Mode 0 is what I need.
I'm talking about the rotation of the avatar when loading the game which always looks in the Z position. (the camera is well behind the avatar in the third person.)

If I save the player's position and rotation in a database before he leaves the game and reloads the game, his rotation in Y is not taken into account (the position is taken into account, but not the rotation), the avatar always looks in Z regardless of the rotation values ​​saved.
If I rotate the avatar to look south or west, when the game loads it will always look north by default.

I tried adding the rotation values ​​in the updateTargetValue() function and that fixed the problem, so I guess something is missing here.
I also tried to remove this function in the call of the Start() function and that also corrected the problem.

I think something is missing in updateTargetValue()

Thanks

from babylonjs-charactercontroller.

ssatguru avatar ssatguru commented on August 12, 2024

Mode 0 also has
setTurningOff(true/false);
So turn it off , change av rotation, turn it on ?

Further
4.4.3 alpha has following methods to help save and load the Character Controller settings
getActionMap()
getSettings()
and
setActionMap()
setSettings()
See get , set settings
Try and let me know if that helps

from babylonjs-charactercontroller.

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.