Jump to content

Search the Community

Showing results for tags 'action manager'.

  • 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
    • Paid Promotion (Buy Banner)
  • Frameworks
    • Pixi.js
    • Phaser 3
    • Phaser 2
    • Babylon.js
    • Panda 2
    • melonJS
    • Haxe JS
    • Kiwi.js
  • General
    • General Talk
    • GameMonetize
  • Business
    • Collaborations (un-paid)
    • Jobs (Hiring and Freelance)
    • Services Offered
    • Marketplace (Sell Apps, Websites, Games)

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 4 results

  1. Hi everybody: Only a quick question. Usually I prefer to use "Observables" over others BJS alternatives, in order to manage all user interaction, namely: myScene.onPointerObservable.add(onPointerDown,BABYLON.PointerEventTypes.POINTERDOWN); myScene.onPointerObservable.add(onPointerUp,BABYLON.PointerEventTypes.POINTERUP); myScene.onPointerObservable.add(onPointerMove,BABYLON.PointerEventTypes.POINTERMOVE); ... This works great but it lacks of the functionality of changing the pointer to the one with the hand, so I need to add an extra step, by means of Action Manager: myMesh.actionManager=actionManager; myMesh.actionManager.registerAction(new BABYLON.DoNothingAction(BABYLON.ActionManager.OnPointerOverTrigger)); /*pointer change*/ Obviously, using the resources of an Action Manager only for the "cosmetic" aim of change the pointer is an overkill. Is there any more clever alternative? Thanks for your time.
  2. I am moving a projectile through space and have registered an OnIntersectionEnterTrigger action to the object and my target. The problem I am facing is that at lower fps, the intersect is sometimes missed due to the object not occupying the same space in a frame because of "skipping". Is there an easy way to interpolate if the object would have intersected via Babylon JS? Or is there a better way to do this? Thank you.
  3. The below code is a snippet from the following location: http://www.babylonjs-playground.com/#DNOLK#1 My question should clarify what I'm asking, even though the above code works (eg. doesn't throw an error). What I was trying to accomplish was taking both actions and causing them to fire at the same time. So far the above code sets both properties, but only by allowing it to take turns alternating each time the intersection occurs. My question is: is there a way to change both "scaling" and "emissiveColor" during the same intersection instance? Thanks in advance for the help.
  4. How do we identify the object whiel trigering a custom action?, See the example below window.onload = function () { // Check support if (!BABYLON.Engine.isSupported()) { window.alert('Browser not supported'); } else { //var canvas = document.getElementById("renderCanvas"); var canvas = document.getElementById("canvas"); var engine = new BABYLON.Engine(canvas, true); var scene = new BABYLON.Scene(engine); var light = new BABYLON.DirectionalLight("dir01", new BABYLON.Vector3(0, -0.5, 1.0), scene); var camera = new BABYLON.ArcRotateCamera("Camera", 0, 0, 10, BABYLON.Vector3.Zero(), scene); camera.setPosition(new BABYLON.Vector3(20, 70, 100)); light.position = new BABYLON.Vector3(0, 25, -50); var y = 0; i=0; var ddd2= BABYLON.Mesh.CreateBox('ddd', 20.0, scene, false); ddd2.position.y = y; y+= 45; ddd2.actionManager = new BABYLON.ActionManager(scene); ddd2.actionManager.registerAction(new BABYLON.ExecuteCodeAction(BABYLON.ActionManager.OnPickTrigger,test)); var ddd3= BABYLON.Mesh.CreateBox('ddd4', 20.0, scene, false); ddd3.position.y = y; y+= 45; ddd3.actionManager = new BABYLON.ActionManager(scene); ddd3.actionManager.registerAction(new BABYLON.ExecuteCodeAction(BABYLON.ActionManager.OnPickTrigger,test)); // Render camera.attachControl(canvas); engine.runRenderLoop(function () { scene.render(); }); } function test(){ console.log(this); }};
×
×
  • Create New...