Search the Community
Showing results for tags 'applyImpulse'.
-
Not sure I understand this well. As per my understanding applyImpulse takes two variables The first variable is the direction and amount of impulse to apply. The second is where on the body itself the force will be applied. This as per documentation here http://doc.babylonjs.com/overviews/Using_The_Physics_Engine#further-functionality-of-the-impostor-class Now consider the following example http://www.babylonjs-playground.com/#26LQEZ#32 here I am applying a small impulse at the center of sphere and it moves slowly as expected. But now comment line 31 and un-comment line 32 and run. In line 32 I am applying a force at a point which is not on the sphere at all. You would think the sphere would not move at all but instead it does move and moves with high speed. How come?
-
Hi guys ! I 've tried to add some features to an old PG (that I have just mada for a previous topic); that one : http://www.babylonjs-playground.com/#1PTVTW#9 I try to apply an impulse to a sphere that "come out" from the ships (when they reach the island) and hit the target (the cylinder in the middle). It works, but just the for time; instead, I would repeat these applyImpulse on every 1sec (or 2sec), after they reach the island. I try to apply the setTimeout() function, but the result does not work well. Here the other PG (it doesn't work): http://www.babylonjs-playground.com/#1PTVTW#10 . So have any idea on how can I do that? Do you think it's the best way? Thank you in advance for your time and patience, cheers
- 4 replies
-
- applyImpulse
- repetition
-
(and 1 more)
Tagged with: