Jump to content

Search the Community

Showing results for tags 'control'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • HTML5 Game Coding
    • News
    • Game Showcase
    • Facebook Instant Games
    • Web Gaming Standards
    • Coding and Game Design
  • Frameworks
    • Phaser 3
    • Phaser 2
    • Pixi.js
    • Babylon.js
    • Panda 2
    • melonJS
  • General
    • General Talk
  • Business
    • Collaborations (un-paid)
    • Jobs (Hiring and Freelance)
    • Services Offered

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


Website URL


Twitter


Skype


Location


Interests

Found 20 results

  1. Hi everyone! I want to set the current position to 0 in pixi.js video object. (video file extension is mp4. Loaded and played successfully) And stop the video completely (not pause). How can I do that? If you know about this, please kindly let me know. Thanks.
  2. So I'm running into this problem where I initialize a sprite with multiple animations, but only the animation specified in the creation of the sprite is ever played. When I attempt to update the sprite with a new animation, it simply changes the framerate. I have debugged the game to see if it is actually updating the currentAnim, and it is. Also, I have tested the other animations too see if they loaded correctly by inputting them into the initializing sprite animation. Now, code: player = this.game.add.sprite(400, 400, 'player_idle'); this.game.physics.p2.enable(player, false); player.bo
  3. Is there a way to control the distance or zooming of the reflected image. Check the two screen shots... Look at the mountains and scenery reflected in the larger sphere. The fist shot is from unity and it SHOW MORE of the reflected scenery behind... The second shot is my babylon but the reflected images are MUCH closer or ZOOMED in more so you see LESS of the reflected scenery in sphere... How can I control the ZOOM or reflected image distances ??? First Shot (Unity Rendered): Second Shot (Babylon Render) And Notice the difference in the ZOOM factor of the
  4. Hiding and showing controls by using isVisible (like a Rectangle in this case) works if the control is not linked to a mesh by linkWithMesh. Once it is attached, the control stays visible. The inner controls (in my case the text inside the rectangle) can be hidden. See the playground https://www.babylonjs-playground.com/index.html#RBP60B#6 lines 35-42.
  5. In games agar.io and slither.io, player control is implemented with the mouse. The player is always in the center of the screen and moves in the direction the mouse cursor points to. Phaser.js offers us control only through the keyboard, as there https://phaser.io/examples/v2/camera/basic-follow. Perhaps someone already implemented control such as in agar.io and slither.io using phaser.js? Maybe someone has code samples?
  6. Hi all, I am using Universal Camera and I would like to improve differents features of it. This is the definition of my camera: var camera = new BABYLON.UniversalCamera("universalCamera", new BABYLON.Vector3(600, 200, -500), scene); camera.setTarget(new BABYLON.Vector3(0,0,0)); camera.speed = 1.5; camera.checkCollisions = true; camera.ellipsoid = new BABYLON.Vector3(1, 1, 1); camera.attachControl(canvas); The first question is about collisions. When I move arround the scene and I go to some building of, all the collisions are calculated and my camera is very slow. Are
  7. Hi, I have an animated ArcRotateCamera who's animation should pause quietly on user input (through PointersInput). At the moment the input components do not announce state changes. I think at the very least, input types should have a `get state` & an `on state change`. IMO the input system could use a rewrite.
  8. I'm trying to find a way to use the mousedown event to move the camera forward. I've mapped the keys so that T moves forward and want it to fire whenever there is a mousedown event. I have come up with the following but cannot get the keypress function to fire when there is a mousedown. Any suggestions would be most welcome. In the scene setup I've set the forward key to: camera.keysUp = [84]; // T After the scene setup I've added: document.addEventListener("mousedown", function(e) { var code = 84;//T $('document').trigger( jQuery.Event('keypress', { ke
  9. So I'm not sure if this is a bug or maybe I've just not configured the camera correctly. I have a scene that's the interior of a building and the interior is made of a bunch of room meshes joined together. I have it so that when you click on a room the camera sets that room mesh as its target. If I try to pan the camera(ctrl and mouse drag) after clicking on a room the whole interior pans except for the room that I clicked on which stays in the centre of the screen, separated from the rest of the rooms. Any way to remedy this? I'm using an ArcRotateCamera by the way. Example of what
  10. Hello I am trying to develop a FPS using BabylonJS and CannonJS in TypeScript. My first problem was what type of Impostor to use as the player, end up using a Cylinder with a FixedRotation = true. Now I place the camera on top off the Cylinder on every frame, and apply Impulses to the Cylinder based on keyboard input, and camera target. The algorithm that I came up is the flowing (hero = Cylinder): scene.registerBeforeRender(function () { //Your code here //Step camera.position.x = hero.position.x; camera.position.y = hero.position.y + 1.0;
  11. How can i control the initilization of the game, i know that the first that phaser do is the preload function but i want to execute some Js code and till that part is finished start the game. Help please
  12. I'm making a top down game where the player moves smoothly around the plane but is confined to a 64x64 grid, I have achieved this by allowing them to move if they are exactly positioned on one of the 64x64 tiles and if they are, the game tweens them to the appropriate tile. The problem is that despite my best efforts it is still possible to move diagonally which would cause a lot of bugs in my collision code. This is the code I am using update: function () { if (player.x%64 === 0 && player.y%64 === 0) { if (game.input.keyboard.isDown(Phaser.KeyCode.W)) { g
  13. Hi I am learning to write shaders and I have noticed that there are a lot of different view spaces and it is not always easy to differentiate and test the output without the ability to rotate the object. It gets more complicated when spaces have to be combined such as bump mapping + environment mapping. For example, in the cell shading demo I notice that the spot light appears to stick to the object and I would want to know if this was because I am orbiting the light source or if it would remain static when I rotated the object alone. Is it possible to rotate the object without orbit
  14. Hello. I can not understand the character configuration management. Character moves forward by means of "w" key. I along with "w" press and release "space". triggered event "keyup" and the event is "keydown" reset how to fix this problem? Make it so that the event "keydown" will not be reset?
  15. Can someone please explain/show me what code I need to insert to add mobile touch support to a game in phaser. I am trying to build onto the invaders example: http://examples.phaser.io/_site/view_full.html?d=games&f=invaders.js&t=invaders I need more specifically a button for keyboard left, a button for space bar, and a button for keyboard right on mobile. Also I have read the docs and I am fairly new to this, so I'm having a hard time deciphering what the docs are even talking about on pages like keyboard events, Phaser.key etc. If someone could please show me an actual example
  16. Hi there, I'm having a bit of a problem with camera controls and multiple scenes, I'm developping a web solution with multiple scenes (allowing me to lower memory and ressources usage and "removing" the dynamic light limit ). The only issue I'm having is that when switching from a scene to an other and locking the controls of the "old" scene with "old_scene.detachControl(renderCanvas, false);" the camera controls are still applied to the camera in the "old_scene". So, when I click and drag on the renderCanvas in a scene, the cameras in all scenes are rotating, even if the controls are supp
  17. When an unidentified specific sequence somehow the ship suddenly starts to climb up, but it should not be. The bug occurs when you click on the left side of the scene. Tell me, please, what is it? Link to the project. var clientX = 0; var clientY = 0; window.addEventListener("mousedown", function (e) { if (e.target.id == 'renderCanvas') { clientX = e.clientX; clientY = e.clientY; } }); window.addEventListener("mouseup", function (e) { if (e.target.id == 'renderCanvas' && Math.abs(clientX - e.clientX) < 10 && Math.abs(clientY - e.clie
  18. I have some code: ...var stage = new PIXI.Container();var texture = PIXI.Texture.fromVideo(url);var video = new PIXI.Sprite(texture);stage.addChild(video);...How I can stop the video or resume playing?
  19. Hey there, its me again with two stupid questions I looked for many examples on the web to understand how I can execute code when a key is pressed. Unfortunetaly, nothing worked for me. Is there a easy way to do this? I just need something like if(key.A) { variableNumber = 1; } Then I want to check some variables, so I tried to use the console from the debug layer: console.log(varTest); The console still tells me only that the Babylon.js engine launched. Any way to feed the console? Thanks for help!
  20. Hi everyone, I'm following a Phaser tutorial by @bryanbibat , the Shoot'em up game. The function moveTopoiter is good when play the game by mouse cursor. However, it hides my view on mobile touch screen. So that I want to improve the controlling of player on mobile touch by swipe action. I tryng to replace these lines in the update function: if (this.input.activePointer.isDown && this.physics.arcade.distanceToPointer(this.player) > 15) { this.physics.arcade.moveToPointer(this.player, this.player.speed); }with these if (this.input.activePointer.isDown ){
×
×
  • Create New...