Jump to content

Hans

Members
  • Content Count

    73
  • Joined

  • Last visited

Everything posted by Hans

  1. Hi! Like I said in another topic I have a problem with parenting pyhsicsImposter and thier collides. I finally prepared a playground to show the problem! http://www.babylonjs-playground.com/#ZENDZ2 You can throw a bullet(ball) with key E and move the mouse while holding left mouse button. Try to throw the bricks and change the color of all bricks! It dont works because you hit a some other brick physicsImpostor. Why? I want to hit each brick while they are parenting and dynamically add new objects (bricks). Edit: I want also remember to this parenting bug:
  2. i did! I also tried physicsImpostor.forceUpdate(); I also tried to relaod all Impostor on runtime after a main object dispose. This problem unfortunately prevents me from moving forward in my project
  3. I have also a stange behavior with parenting and physicsImpostor, but i can`t reproduce it for now. The Problem there is: I have a main object (mesh) with pyhssicsImpostor. Many other child objects with own physicsImposter are parented on runtime to the main object. After one two ... it becomes all strage somehow. childobjects appear on wrong positions, some child objects have no physics and so on. AND: the important thing: In some cases the onCollideEvents tells me I hit the main object ... but it hits a child object. Dont know, but maybe it belongs together with the problem from
  4. That does! There is stil a problem. A picture paints a thousand words. I made a picture for the problem. It shows two meshes "on collide event". I want the contact point (position of the red sphere) on collide event. (But we just get the green ball positions) PS: @Wingnut here is the your demo for the seconde way (line 55 and 56): http://www.babylonjs-playground.com/#1IB3JT#8
  5. This is possible with: mesh.physicsImpostor.onCollideEvent = function (self, other) {...} I think this works normal or? I dont realized inconsistents with this way by now Problem: I want also the contact point. Above i can just get the positions of both collide elements, but not the point between where there bodies are in contact. I don't know the physics stuff in BJ. My first idea was to make my own solution to get the contact point: If the collide event is triggerd, I can maybe calculate the contact point for simple mash objects. I think I can ascertain all necessary valu
  6. Hm, i tried this code: meshA.physicsImpostor.registerOnPhysicsCollide(meshB.physicsImpostor, function (main, collided) { // do something ... }); The Problem: I have to know which meshes will collide in the future. In my case are potential unlimited meshes. Is there a way to track one mesh collide with something else?
  7. Hi @all again, is it possible to get the first point of contact if two objects with physics collide? Of course i can get the positions of each object by itself, but not the point where their bodies contact at the first time, or? If yes, how?
  8. Sorry forgot to save the PG :X http://playground.babylonjs.com/#7CPXT#2
  9. Hi @all, I have a question about the rotation again. This time its also about the lock joint. I had a similar question in the past without lock joint here: http://www.html5gamedevs.com/topic/29158-solved-rotate-player-correct-on-rotating-platform/#comment-168011 I want the same as last time, but now with lock joint. I prepared a playground: http://playground.babylonjs.com/#7CPXT#2 [In this PG you can rotate the platform with key v, b, and n. The player can rotate with the mouse (drag&drop)] Without the lock joint the behavior is like I want, but for many reasons I need this
  10. Hi @all, Is there a problem with the HeightmapImpostor? In my test application dont work the pyhsics anymore. The player and other objects fall now through the ground. let groundFHM = BABYLON.Mesh.CreateGroundFromHeightMap("groundFHM", "textures/heightMap.png", 100, 100, 100, 0, 10, scene, false, function () { ... groundFHM.physicsImpostor = new BABYLON.PhysicsImpostor(groundFHM, BABYLON.PhysicsImpostor.HeightmapImpostor, { mass: 0, friction: 0.2,restitution: 0.3 }, scene); }); In this Demo from @Wingnut http://www.babylonjs-playground.com/#1RKZXB#6 works the physics
  11. So I need 4 cameras for a local coop game with two players who want to see the whole world and each his crosshair/gun sight. Example: player01: camera1 with layerMask == 3 // world camera2 with layerMask == 1 // crosshair for player01 player02: camera3 with layerMask == 3 // world camera4 with layerMask == 2 // crosshair for player02 I am right? How strongly a new camera affects the performance? Does this kill performance on mass for a 4 player coop game?
  12. Thanks. Your demo has a strange behavior somehow (The player is flies ). I think its up to an alpha BJ update? Edit: now your demo works again I will try and play around with it. Edit: Your way seems to work for me. Thanks a lot!
  13. If I get it right its not possible to show one komplex scene in two cameras completely and just one or few meshes in the scene are invisible for one of two cameras. The only way I see is to add more cameras which show/overlay the 'secret' meshes. Right?
  14. Ah, thanks, this is what i need, but i dont get it to work. The demo in the tutorial also dont work for me. Is it a bug?
  15. How is it possible to make a mesh or sprite (in)visible for just one of two active cameras?
  16. Hi @all again, I have a huge problem with rotation. I hang about one week on this problem. I perpared a playground: http://playground.babylonjs.com/#7CPXT I have a player with a front side. You can see the front side with the aid of the nose mesh. It is the player view direction. The player rotates with the camera rotation. The player stand on a platform. It is possible to rotate the platform with the keys V, B and N. My achived behavior is: The player stand ALWAYS orthogonal on the platform indifferent the platform is rotating AND the player can rotate normal by himself in his
  17. Hi, have a problem with parenting physics objects together. Here an easy playground: http://www.babylonjs-playground.com/#AF886#1 Why is b dont collide with the ground too like the parent? I want both collide the ground and behave like one. Is it a bug?
  18. Okay, thanks! Is there a ticket for this bug? So i can see when its solved.
  19. Hi @all, I think I found a bug again. In this PG: http://playground.babylonjs.com/#249T6Y I change friction for a to zero but friction b becomes zero too (See console too) If it is no bug, please tell me how can I change the friction for just a.
  20. The bug is even the strange behavior. How can I show my problem else? BTW: Not only B changes his friction. If I add more meshs they change thiers friction too. I mean all change the friction by changing just one. If I bug post this, I can not get a workaround. And maybe there is a special reason for this behavior and it is not a bug. I still looking for help/workaround this behavior.
  21. console.log(b.physicsImpostor.physicsBody.material.friction) a.physicsImpostor.physicsBody.material.friction = 0; I change just friction of a (ceteris paribus). I write friction of b in console. Friction of b is also = 0. It shouldn't be 0 too. You can see it also on mesh behavior.
  22. I think "setPhysicState" ist deprecated. See here:
  23. @Dad72 I know. Thought the question is implicitly clear. Question: How can I workaround this bug? If I change the friction of cube A to 0.0001 then friction of cube B is also 0.0001.
  24. Hi @all, I think I found a bug again. In this PG: http://playground.babylonjs.com/#249T6Y Edit: New URL:http://playground.babylonjs.com/#249T6Y I change friction for a to zero but friction b becomes zero too (See console too) If it is no bug, please tell me how can I change the friction for just a.
×
×
  • Create New...