nodejs Posted November 11, 2017 Share Posted November 11, 2017 Hello, i created a litle game, based on the car demo in the playground, Now i have noticed that when i click with the mouse (left, middle, right) the car bounce a litle for and then back. also when the key is released. I have created an video: https://sendvid.com/f3xjn5vd Have a look on the console. I dont think this is not an problem with my game logic, more with the canvas. Like you drag & drop the frame. Has anyone an similar problem or a fix for me ? I dont know what to do. Quote Link to comment Share on other sites More sharing options...
Wingnut Posted November 11, 2017 Share Posted November 11, 2017 Hiya NodeJS, welcome to the forum. Umm... can you make this problem happen... with the playground version? Or, can you show us your keypress handler and click handler code, if some is active? Is ANY code executed when user presses key or clicks mouse buttons? If so, look VERY carefully at that code. It LOOKS like car only jumps forward/backward. This might indicate that something is setting car position to car current position. There SHOULD be no-affect, but... ... when the car gets its .position set, it has already traveled forward a small amount. When the position is set, the car jumps backwards to the location where the .position was "sampled" (gotten-from). That is an "old" or "stale" position, and this makes the car jump backwards a small amount. If you ARE setting a .position or doing a .moveWithCollisions(someAmount) INSIDE-OF your keypress or click handlers... turn that off. Test again. I think this is the area of trouble. Positioning or moving the car to a stale/old position. The car WAS at that location, but exited that location 1/4 second ago. Quote Link to comment Share on other sites More sharing options...
nodejs Posted November 11, 2017 Author Share Posted November 11, 2017 Copyd the source from the playground, and the "bug" is still present. I dont have any click handlers or key input, expect the Babylon ActionManager(); I commited everything else out what can handle user inputs. EDIT: reduced evrything to an minimal HTML markup & script from playground: Bug still exists EDIT2: As i want to upload my game for debugging, i added the Babylon.js 2.5.0 from CDN.com -> bug is gone. If you use 3.0.1 Beta the bug is there Game in the Attachment for Demo. Feel free to change the Babylon.js versions, from 2.5.0 to 3.0.1 or backwards. Then you see there is a bug when you click with your cursor on the canvas index.html Wingnut 1 Quote Link to comment Share on other sites More sharing options...
Wingnut Posted November 12, 2017 Share Posted November 12, 2017 H again, NJS. We're kind-of waiting for the big dogs to return from weekend break. This one has me baffled/stumped, so far. I have done home testing, and I see the issue (and agree about BJS versions). I see no problems with keypresses, so far. I DO see "car jump" with mouse-down and mouse-up. Camera pointer inputs are not involved, because camera is not attached to canvas. scene.onPointerDown is not the problem (I don't think), because I over-rode it, and removed ALL code from that function. The issue still persisted. Tested mostly in Firefox. With IE, I had to "fight" to get it to load, but it finally did. Same problems seen. We're watching this issue closely, and we will determine WHY this is happening, hopefully soon. *scratch scratch* Thx for the report! Quote Link to comment Share on other sites More sharing options...
RaananW Posted November 13, 2017 Share Posted November 13, 2017 So! Playground created, to ease the process. https://www.babylonjs-playground.com/#9CBB12 I can't reproduce any jump, want to show us the problem? Quote Link to comment Share on other sites More sharing options...
Wingnut Posted November 13, 2017 Share Posted November 13, 2017 Hi R. I couldn't make it happen in PG, either. Use the provided index.html (in 3rd post) to see the issue, if you please. Car must be moving.... for click-jump to happen. On 11/11/2017 at 10:54 AM, nodejs said: Copyd the source from the playground, and the "bug" is still present. I used some "read between the lines", there. NodeJS copied a PG version that showed no problems. When NodeJS got it home, and switched BJS to CDN version, the problem started. See top section of his/her index.html: <!-- NO BUG !!!! --> <!--<script src="https://cdnjs.cloudflare.com/ajax/libs/babylonjs/2.5.0/babylon.js"></script>--> <!-- BUG: Bouncing car --> <script src="http://cdnjs.cloudflare.com/ajax/libs/babylonjs/3.0.1-beta/babylon.js"></script> I'm not sure if the playground can be told to use CDN versions. If not, PG is useless for this bug-find. Quote Link to comment Share on other sites More sharing options...
RaananW Posted November 13, 2017 Share Posted November 13, 2017 Welp, using 3.0.1-beta might be the wrong thing to do Checking with stable version on the playground also shows no sign on jumping, so I guess it was a bug that was fixed. @nodejs (are you really THE nodejs?) Can you try with the lastest 3? Quote Link to comment Share on other sites More sharing options...
Wingnut Posted November 13, 2017 Share Posted November 13, 2017 Patient: Doctor, doctor, it hurts when I do this! (some physical action) Doctor: Well don't DO that! heh. Yeah, the plausibility of "fixing" this, or losing sleep over it... might not be there. Still, it's great when users report these issues... so we know things. Quote Link to comment Share on other sites More sharing options...
RaananW Posted November 13, 2017 Share Posted November 13, 2017 Nice one! I think that it is not the case here, as we already have a stable version to this beta... It is more along the line of: Patient: Doctor, the old pills you gave me are not working! Doctor: But I already prescribed new pills a few months ago, why don't you use them? Not as funny, but a bit more accurate Quote Link to comment Share on other sites More sharing options...
Wingnut Posted November 13, 2017 Share Posted November 13, 2017 *nod*. Just use https://preview.babylonjs.com/babylon.js, I guess. Wiser. It shows no sign of problems. Quote Link to comment Share on other sites More sharing options...
nodejs Posted November 13, 2017 Author Share Posted November 13, 2017 Thank you buddies for your help(s?) I'm sorry if I've caused you inconvenience. I think my main problem is i dont know wich is the last stable version on Github/cdnjs.com and so on... @RaananW I am not a Developer on Nodejs if you mean that Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.