• Content Count

  • Joined

  • Last visited

About George3D

  • Rank

Profile Information

  • Gender
  • Location

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

  1. Ok, thank you for informations, so I better change my Code.
  2. I have always used "setPhysicState" to set physics properties of objects, in many projects. Meanwhile I read it's better to use "new BABYLON.PhysicsImpostor" instead. Why should that be better? What are advantage and disadvantage?
  3. I want to repeat my "limb"-question: although the objects now rotate around an origin at the top of the cylinders, the first step they made a "jump". Does anyone know a solution for this Problem?
  4. I'm writing a book about the excellent Babylon engine (in German - I'm looking for an anglophone publisher ). In this connection i've created a function to construct a simple android. Maybe someone is interested in the code. Here it is, try and improve it! android.js
  5. Thank you griff for the hint to an interesting topic. But changing my code by using setPivotMatrix() doesn't solve the problem. the first step is still a "dancing" one.
  6. Ok, you'll find the (shortened) Code in the Playground:
  7. I have built a character with elements created by CreateSphere() and CreateCylinder(). All parented with a central element collected in an own function. To animate single limbs of the "android" I first used the function getChildMeshes() to get the children of the parent. The animation works together with a key-event, but there is one problem: while the first move the limbs are flying around, then they return to their place and work well. How can I solve my Problem?
  8. @JohnK: Thank you for the detailed information. I tried it and it works fine. But meanwhile I found another solution with sin and cos: var xDiff = 0.5 * Math.sin(android.rotation.y); var zDiff = 0.5 * Math.cos(android.rotation.y); if (key == 37) // left around android.rotation.y -= Math.PI/4; if (key == 38) { // forward android.position.x += xDiff; android.position.z += zDiff; } if (key == 39) // right around android.rotation.y += Math.PI/4; if (key == 40) { // backward android.position.x -= xDiff; android.position.z -= zDiff; } @adam: My model (= android) is facing in the right direction. That was not my problem but the rotation.
  9. Sorry, but if you mean "movePOV" it doesn't work: the player is still moving sideways after turning (rotating) left or right.
  10. I have this Code to move a player (3rd person) forward and backward, with the arrow keys left-right I can rotate the Player: if (key == 37) // left android.rotation.y -= Math.PI/2; if (key == 38) // foreward android.position.z += 0.5; if (key == 39) // right android.rotation.y += Math.PI/2; if (key == 40) // backward android.position.z -= 0.5; But after a rotation the facing direction is wrong. How can I correct this?
  11. Thank you your efforts, in the meantime I found out: the picking is working. It's my problem, I hit the bug very rarely. Thanks also for the "click-hints". And a new question: What ist the difference between clientX/Y and pointerX/Y? Both seem to work equally.
  12. I didn't know how to get the image into the Playground.
  13. I copied the shortened Code in the Playground: I used an image file with 2 cells (0 = normal; 1 = squashed).
  14. I found another (longer-winded) way: function pickIntersect (point, pos, diff) { if ((point.x > pos.x-diff) && (point.x < pos.x+diff) && (point.z > pos.z-diff) && (point.z < pos.z+diff)) return true; return false; } if (pickIntersect(pickResult.pickedPoint, player.position, 2)) player.cellIndex = 1;