Herbert

Members
  • Content count

    69
  • Joined

  • Last visited

  1. So it might happen when I try to switch the scene to be rendered. var scene = createScene(engine); var scene2 = createScene(engine); var sceneOption = [ scene, scene2 ]; var sceneIndex = 0; setTimeout(() => { sceneIndex = 1; }, 0); engine.runRenderLoop(function () { sceneOption[sceneIndex].render(); }); and it depends on the timing you switch the scene(e.g. maybe switch at 10ms is alright, but might go wrong at 11ms)
  2. Hi @RelativeNull This is already tested in the latest version(3.1 alpha) I recreate a simple project and everything goes well, so I think it only happens to a specific case. I will test around it, if I find something I will post it here. but i am also curios why does the speed become so slow in this PG example(https://www.babylonjs-playground.com/#DU4FPJ#3)
  3. putting it to sleep sounds good, thanks
  4. hi I try to use onBeforeStepObservable so I pass two more option to engine(http://doc.babylonjs.com/tutorials/animations#deterministic-lockstep) var engine = new BABYLON.Engine(canvas, true, { deterministicLockstep: true, lockstepMaxSteps: 4 }); and it occurs an error like below at scene.render() engine.runRenderLoop(() => { scene.render(); }); If I set the lockstepMaxSteps to 1, then it's alright. This issue seems not happen to the example on PG(https://www.babylonjs-playground.com/#DU4FPJ#3) any hint what could be the problem?
  5. Thanks, friction it is but where does the velocity come from while both ground and box have no rotation ?
  6. hi, I have a physic body which should be static on the ground, but I log it's position, and it actually keep changing slightly, why? https://playground.babylonjs.com/#KQBGAR
  7. I like forceUpdate~ I'll go for it, https://playground.babylonjs.com/#9T2J6Z#12 since it recreate an impostor, I don't need to worry about init velocity, quaternion and other stuff . However, in my case, I want these two boxes not colliding to each other, so I still need to reset collisionFilter after forceUpdate. Still, it's better than my piece-by-piece setting In case anyone else is interesting in this, I will put on the solved tag a few days later
  8. https://playground.babylonjs.com/#9T2J6Z#10 So If I don't want to delay the impulse, I have to manually update physicsBody's value.
  9. About incorrect highlight positioning, both imac and macbook have this issue. Yeah I think micro-values are inconsistent, even I set ZERO to setTimeout, it works sometimes. The point is I think you are right, your experiment proves position's establish has a little delay.
  10. But actually the color does not bother me too much, the incorrect position on the other hand makes it a bit hard to edit. This pic is what I see after double click physicsImpostor.
  11. hi @BitOfGold Creating a new one sounds good, thanks for your suggestion But now I am also curious about the follow up riddle(why the impulse happens before position set as Wingnut mentioned)
  12. Hi Wingnut, Your deduction make sense to me, I should've noticed there should be no rotation. And, sure, I will keep testing btw, is it just me, or the PG is a bit weird these days, the cursor would select on wrong position
  13. hi @Wingnut thanks for the reminder, but I change it to vector3 still the same. https://playground.babylonjs.com/#9T2J6Z#2 I also reset the physicsBody's velocity and quaternion, still not work.
  14. Hi guys, I am wondering how I can remove all the effects of an impulse. I made a playground here(https://playground.babylonjs.com/#9T2J6Z) So there are 2 same boxes, I hit the box1 with the impulse1 first, then I hit both boxes with the impulse2 respectively(I reset position, quaternion, LinearVelocity and angularVelocity before applyImpulse) I expect them to have same track and final position, but seems box1 still have the effects from impulse1, what else do I need to reset to entirely remove the influence form impulse1? and I am curious why the LinearVelocity and angularVelocity is not zero when the box stop on the ground from the dropping?
  15. Thank you guys, I get exactly what I want