Search the Community

Showing results for tags 'rotating'.



More search options

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • HTML5 Game Coding
    • News
    • Game Showcase
    • Facebook Instant Games
    • Coding and Game Design
  • Frameworks
    • Phaser 3
    • Phaser 2
    • Pixi.js
    • Babylon.js
    • Panda 2
    • melonJS
    • Haxe JS
    • Kiwi.js
  • 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 6 results

  1. Hey guys, I'm playing around with Babylon a little bit and the posibilities are amazing! Maybe a little to much at the beginning. This question maybe sounds silly for you but I still hope you can and will help me. I tried to stop the camera zoom by mouseWheel but I want to keep the rotation but nothing I'm doing is working. When I do this: this.camera.attachControl(this.canvas, false, true) I can zoom with the wheel and rotate with the keyboard and the wheel. If I don't have this line I can't zoom but of course don't rotate either. Is there a line I have to add or a parameter I need to set to false? I'm thankful for every suggestion. Google wasn't much of a help. Thanks. Jay
  2. So, I'm developing my frist game right now, and after having lots of troubles choosing the best physics system, I think I'm going with p2, since I need circle collisions. I want to make a sprite, rotating a point, like an orbit, the problem is that when I set the anchor of that sprite, it doesnt rotate the collision body associated to it, it only rotates the image. As you can see in the image, the phaser logo rotates, but the collision body (little debug circle), does not displace itself to the center of the sprite.this.game.physics.p2.enable(this.sprite, true);this.sprite.body.setCircle(16);this.sprite.body.velocity.y = 100;this.sprite.body.angularVelocity = +5;this.sprite.anchor.setTo(-0.3,0.5)this.sprite.body.setZeroDamping();
  3. Hello. Tell me, gentlemen, please, how you can make the camera so that it is sensitive to rotate relative to the flight of the ship, as in the screenshot. For example, the ship we click in the right pane -> right the ship is flying -> camera turns slightly to the left (ie, in the opposite direction). Second. I know this topic I had been the occupying this forum, but I would have to finish all) So, please see the fact that I have now and tell me how to make a more realistic management. As an example, I cite the video. In the video if there is no first point - turn the ship relative to the part of the flight
  4. I'm working on a game where the player controls a rotating vehicle which can collide with enemies and coins. I'm aware that the sprite body (aka "hit area") can only be a rectangle and it cannot be rotated. So instead, I've created 3 separate invisible sprites that only serve as hit detection areas. These hit areas rotate around the player's axis as the player rotates and this all works fine. See image and github code below, it's just test code where the plane follows the mouse cursor and you can rotate it with the cursor keys:https://github.com/BdR76/phasercollision My question is this:I'm wondering if there is a more efficient way to do this. Is there a way to access the sprites in a group like playerHitGroup.sprites[0] and playerHitGroup.sprites[1] etc.? That way I could just create the sprites in a for-loop and I wouldn't have to keep 3 separate vars for the sprites like the code is now:var dum1;var dum2;var dum3;// setup the player hit spritesdum1 = game.add.sprite(0, 0, null, 0, playerHitGroup);dum1.body.setSize(32, 32);dum1.anchor.setTo(0.5, 0.5);dum2 = game.add.sprite(0, 0, null, 0, playerHitGroup);dum2.body.setSize(32, 32);dum2.anchor.setTo(0.5, 0.5);dum3 = game.add.sprite(0, 0, null, 0, playerHitGroup);dum3.body.setSize(32, 32);dum3.anchor.setTo(0.5, 0.5);
  5. I want to make a rotatable knob. I want the player to be able to click the knob or just outside the knob and then for the knob image's angle to change. But I don't know how to work out what angle it would be. I know it's the angle between the mouse pointer, then center of the knob and then top of the knob that I want. This won't even make a triangle if the angle is large enough so looking at trig tutorials I can't even find anything appropriate. Once again my lack of maths knowledge has failed me. But just so you know it's not for lack of trying. Whenever I try and learn trig, there is something from algebra I don't understand, so I get an algebra book which contains an example using fractions, so I brush up on fractions but it contains some large multiplication problems, so I have to practice that then before you know it i'm back to practicing my times tables and have learned nothing to help with programming. Although I totally know what 7 * 8 is without using google. If anyone can explain, please use as little math jargon as possible and imagine your are explaining to a 10 year old with learning difficulties, or you'll probably just lose me. If anyone can just supply code that I can pretty much copy and paste and get working can have a permanent advertisement in the game for their website or game of choice.
  6. Heres the second tutorial for using Metrix.js along with Three.js, this tutorial explains the basics of how the Metrix.js entity system works and how to create objects/entities. In the tutorial you will learn how to create a Metrix.Object and a update callback to go with it to rotate the cube from our last tutorial. You can checkout the tutorial here http://www.psych.gs/wordpressblog/metrix-js-tutorial-1-entitiesobjects-and-rotating-the-cube/ And heres what you should have once you finish the tutorial