Comments (6)
@warrenchopin try setting _freeFall to true instead of false. Let me know if that works
from babylonjs-charactercontroller.
The above error was raised when _inFreeFall= true. I edited the posting correctly.
I tested both _inFreeFall= true and false cases again for sure. The error was raised only when _inFreeFall= true
I thought about three scenarioes to solve this problem.
- a new command freeFall()
- a new command moveToPosition(pos, freeFall)
- a new command moveDiff(vDiff)
The best solution for me is 3. moveDiff(). It is a general function that can be used in many different situations. The problem happened after I overwrote avatar.mesh.position at collision. Overwriting position is pretty aggressive way possibly disrupting CharacterController. moveDiff() will give a way to avoid overwriting mesh.position. Is there a similar function available now?
Thanks again.
from babylonjs-charactercontroller.
You are right in that we do need a function for fall.
Just like we can do jump programmatically , we should be able to do fall too.
This will be usefull for use cases like yours, moving platforms etc.
Let me work on this.
In the meantime try setting CharacterController._grounded to false after collision and let me know if that works.
from babylonjs-charactercontroller.
It worked when I set the two variables together.
cc._inFreeFall= true
cc._grounded= false
The collided avatar free falls naturally now: The problem solved. Thanks you so much for your help.
from babylonjs-charactercontroller.
Nice.
I just published a new version (0.4.4) with a cc.fall() function to force a fall.
This should also play a fall animation while falling.
from babylonjs-charactercontroller.
@ssatguru: The error was raised later again. I set only cc._grounded=false at this time, and the error disappeared again:
cc._grounded= false
I am not sure whether CharacterController is unstable, or my program is unstable in this case. I will report here if something is wrong again.
Thanks again.
from babylonjs-charactercontroller.
Related Issues (20)
- pressing shift should make walkback ,strafeLeft/Right, turnLeft/Right faster HOT 1
- BabylonJS ES6 Module support HOT 6
- Avatar reflection? HOT 1
- testAnimationGroup from GLB not working HOT 7
- support babylon v5 HOT 4
- How to destroy? HOT 3
- updateTargetValue bug HOT 4
- What about pull requests awaiting review ? HOT 3
- PauseAnims() doesn't pause HOT 4
- Use characterController for secondary players HOT 9
- First person not working with glb avatars HOT 3
- moveWithCollision and calcMovePOV jitter HOT 3
- There was jitter when performing the Walkback and trunRight operations
- Work with Havok
- How can I change brightness of the avatars? HOT 2
- use raycast to detect slope,steps and ground
- Using Character Controller on Server HOT 1
- Problem with character mesh? controller?
- How can I copy an avatar and synchronize remotely?
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from babylonjs-charactercontroller.