• Content Count

  • Joined

  • Last visited

About angeltrickz

  • Rank

Recent Profile Visitors

1535 profile views
  1. help when firing with weapon.(fire) goes by apoco lowering the fps how can I avoid this?
  2. thanks but I already solved the problem: P
  3. help in my game I eliminate an enemy with enemy.kill () and deasa appears but the associated weapon keeps firing .. and enemy.destroy () gives me an error ..
  4. VRDeviceOrientationFreeCamera help does not work .. I try to use it on my cell phone but it does not move ...
  5. var camera = new BABYLON.VRDeviceOrientationFreeCamera ("Camera", new BABYLON.Vector3 (-6.7, 1.2, -1.3), scene, 0); camera.attachControl(canvas, false); console.log(camera.inputs.attached) camera.inputs.attached.deviceOrientation.detachControl(canvas); var onOrientationEvent = function(evt) { this._alpha = (+evt.alpha | 0) + 45; this._beta = (+evt.beta | 0) + 45; this._gamma = +evt.gamma | 0; this._dirty = true; } camera.inputs.attached.deviceOrientation._deviceOrientationHandler = onOrientationEvent.bind(camera.inputs.attached.VRDeviceOrientation); camera.inputs.attached.deviceOrientation.attachControl(canvas); scene.activeCamera = camera; A few years ago I was working with a webvr project and this code worked for me with a cell phone but now it does not work and I searched for more vr methods in babylon, but none works as before the movement of the phone ..
  6. How to rotate body with Arcade physics? when trying to just rotate the sprite not the body
  7. for (var i in Game.playerMap) { for (var e in Game.weaponMap) { game.physics.arcade.collide(Game.playerMap[i], Game.weaponMap[e].bullets,Game.colision(i), null, this); } }; Game.colision = function(id){ //console.log(id); //Client.socket.emit('colision',"colision"); }; I want to make collisions and send them via socket to the server ... but for now I have a problem because it constantly sends me collisions without detecting between the shot and the enemy .. any ideas?
  8. how can I define the hit area of a single bullet and a sprite
  9. hello I am trying to move a sprite with Accelerate To Pointer and send with socekt to the other players. but I do not find ... any support? game.update = function(){ player.rotation = game.physics.arcade.moveToPointer(player, 60, game.input.activePointer, 500); Client.socket.emit('rotandpos',{x:player.x,y:player.y,r:player.rotation}); };
  10. thank you pro the answer .. but I mean an object follow another or to the camera ... as this example in unity :
  11. this in babylonjs ?? ???
  12. mm other questions as I leave the character walking in place ..that this not move axes ..