Search the Community

Showing results for tags 'target'.



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

  1. Hello guys, I have a scene with a FollowCamera and I need to switch between multiple targets. For some reason though, I cannot get to make the switch smooth. When setting lockedTarget directly it jumps from one position to another. I tried to make an animation with the "lockedTarget" property but it doesn't work. Maybe you guys could help me out? PG: https://www.babylonjs-playground.com/#9AXYDK#1 Thank you!
  2. Hello, I'm new to Babylon.js and I'm looking for a way to use the ArcRotateCamera AND move its target by arrow keys for example. I would like to rotate the camera around the scene and also to be able to look closely to left bottom corner for instance. Is it possible or am I making stuff up? Thank you :-)
  3. Are we no longer serializing ArcRotateCamera's target? See playground example http://www.babylonjs-playground.com/#I9AVT#1 line 29 sets the target click the large box to serialize and reload the scene . After the scene is loaded you will see the target is zero. (Also notice the line mesh disappears on reload)
  4. I'd like to manually rotate my ArcRotateCamera around the target by code, taking into account the radius of the camera. It should imitate how it works with user control when camera.attachControl(canvas, true). e.g. something like camera.setRotation(Math.PI, 0, 0) - which doesn't exist. How do I do that?
  5. I want to be able to animate my camera and its target to different locations around my scene. I set up an some animation keys but I don't know how I would animate my target. I am using the values for camera._currentTarget to come up with something set the target of the camera too, but I am not sure what I am missing here. Why doesn't this work? All that animates is my camera position but my target remains the same. The camera and target should dolly to the new positions engine.runRenderLoop(function () { if(cameraAnimating){ camera.setTarget(camera._currentTarget); } scene.render(); }); function animateCamera(pos, tgt, frameCt){ var animPos_x = new BABYLON.Animation('animPos_x', 'position.x', 30, BABYLON.Animation.ANIMATIONTYPE_FLOAT, BABYLON.Animation.ANIMATIONLOOPMODE_CONSTANT); var animPos_y = new BABYLON.Animation('animPos_y', 'position.y', 30, BABYLON.Animation.ANIMATIONTYPE_FLOAT, BABYLON.Animation.ANIMATIONLOOPMODE_CONSTANT); var animPos_z = new BABYLON.Animation('animPos_z', 'position.z', 30, BABYLON.Animation.ANIMATIONTYPE_FLOAT, BABYLON.Animation.ANIMATIONLOOPMODE_CONSTANT); var animTgt_x = new BABYLON.Animation('animTgt_x', '_currentTarget.x', 30, BABYLON.Animation.ANIMATIONTYPE_FLOAT, BABYLON.Animation.ANIMATIONLOOPMODE_CONSTANT); var animTgt_y = new BABYLON.Animation('animTgt_y', '_currentTarget.y', 30, BABYLON.Animation.ANIMATIONTYPE_FLOAT, BABYLON.Animation.ANIMATIONLOOPMODE_CONSTANT); var animTgt_z = new BABYLON.Animation('animTgt_z', '_currentTarget.z', 30, BABYLON.Animation.ANIMATIONTYPE_FLOAT, BABYLON.Animation.ANIMATIONLOOPMODE_CONSTANT); var animPosKeys_x = []; animPosKeys_x.push({ frame: 0, value: camera.position.x }); animPosKeys_x.push({ frame: frameCt, value: pos.x }); animPos_x.setKeys(animPosKeys_x); var animPosKeys_y = []; animPosKeys_y.push({ frame: 0, value: camera.position.y }); animPosKeys_y.push({ frame: frameCt, value: pos.y }); animPos_y.setKeys(animPosKeys_y); var animPosKeys_z = []; animPosKeys_z.push({ frame: 0, value: camera.position.z }); animPosKeys_z.push({ frame: frameCt, value: pos.z }); animPos_z.setKeys(animPosKeys_z); camera.animations.push(animPos_x); camera.animations.push(animPos_y); camera.animations.push(animPos_z); var animTgtKeys_x = []; animTgtKeys_x.push({ frame: 0, value: camera._currentTarget.x }); animTgtKeys_x.push({ frame: frameCt, value: tgt.x }); animTgt_x.setKeys(animTgtKeys_x); var animTgtKeys_y = []; animTgtKeys_y.push({ frame: 0, value: camera._currentTarget.y }); animTgtKeys_y.push({ frame: frameCt, value: tgt.y }); animTgt_y.setKeys(animTgtKeys_y); var animTgtKeys_z = []; animTgtKeys_z.push({ frame: 0, value: camera._currentTarget.z }); animTgtKeys_z.push({ frame: frameCt, value: tgt.z }); animTgt_z.setKeys(animTgtKeys_z); camera.animations.push(animTgt_x); camera.animations.push(animTgt_y); camera.animations.push(animTgt_z); cameraAnimating = true; scene.beginAnimation(camera, 0, frameCt, false, 1, function(){ cameraAnimating = false }); }
  6. Update - the game is now available on Google Play as a native app: https://play.google.com/store/apps/details?id=com.afgt.naval The link http://www.askforgametask.com/mobile/games/naval/ Description Naval Battle is an HTML5 arcade game in which your mission is to destroy a fleet of enemy cargo ships before they deliver ammunition and provisions to the enemy troops. You are the commander of the VIC Victory, a fast light tank used by the Mobile Costal Artillery in defending a country against sea attacks. Your tank is armed with a limitless supply of anti-ship shells, but be aware that only one shell can be in view at a time! You have only 70 seconds to sink all enemy ships. They are not armed, but they are protected by the gun fire from a fortified enemy battery on the other side of the bay. And they are moving with different speeds. So you need to aim very carefully! The game ends if you fail to complete the mission within the 70-second time limit or if your tank is destroyed by enemy gun fire. Controls Use the left and right keys to move. Use the up or space key to fire. Screenshots
  7. Hello guys, I would like to make a debugger such one of these: -http://www.paulallenrenton.com/individual-projects/webgl-deferred-renderer -http://codeflow.org/entries/2012/aug/25/webgl-deferred-irradiance-volumes/#debugging I am trying to use multiple rendering target with this webgl extension => (https://www.khronos.org/registry/webgl/extensions/WEBGL_draw_buffers/), so when I am rendering my scene I would like in my fragment shader to write something like this: #extension GL_EXT_draw_buffers : require precision highp float; uniform sampler2D positionSampler; uniform sampler2D normalSampler; uniform sampler2D depthSampler; uniform sampler2D stuffSampler; varying vec2 vUV2; void main(void) { gl_FragData[0] = texture2D(positionSampler, vUV2); gl_FragData[1] = texture2D(normalSampler, vUV2); gl_FragData[2] = texture2D(depthSampler, vUV2); gl_FragData[3] = texture2D(stuffSampler, vUV2); } with each gl_FragData writing in a webgl texture associated. I didn't find a lots resources about it on the internet... I am working with babylon.js, any example or help would be great. Thanks !
  8. Right now I am trying to figure out how to make my character's eyes rotate and orient towards a camera. I am attaching my babylon file to this, but what I am hoping to do is create a lookAt function for the eyes. Is there an easy way that I can set the local rotation for the eyes so that they follow the camera, or any object in 3d space? The pivot point of the eyes is in the center of the eyes so they should rotate without a problem. I realize that the idea of the forum is to contribute to the solution as well, but I am a little lost as to where to start. Is there some information on the web that can help as well? Thanks. I attached the babylon file in case anyone wanted it. content.zip