BabylonJS Tutorial Series -- Part 2: Cameras

แชร์
ฝัง
  • เผยแพร่เมื่อ 29 พ.ย. 2016
  • In this part of our ongoing BabylonJS tutorial series we look at creating cameras. We specifically look at Free, Arc Rotate and Follow cameras with a quick discussion of other camera options available in the game engine.
    The source is available here:
    www.gamefromscratch.com/post/2...
  • เกม

ความคิดเห็น • 36

  • @gamefromscratch
    @gamefromscratch  6 ปีที่แล้ว

    BabylonJS Links:
    www.gamefromscratch.com/page/BabylonJS-Tutorial-Series.aspx

    • @antoniofuller2331
      @antoniofuller2331 2 ปีที่แล้ว

      Now I see why everyone wanted to go to Babylon. I'm impressed, worthy to be used by me.

  • @saashapina5121
    @saashapina5121 6 ปีที่แล้ว +15

    Awesome tutorial! A couple things:
    A mix up in the ASCII numbers the code will work right he just mixed the letters up when saying them. 87=W, 83=S , 65=A, 68= D.
    Also in order to get follow camera to work in updated versions uses camera.lockedTarget = box; instead of camera.target = box.

  • @VickylanceMedia
    @VickylanceMedia 5 ปีที่แล้ว +28

    Its no longer *camera.target=box;* its now *camera.lockedTarget=box;*

  • @samdavepollard
    @samdavepollard 6 ปีที่แล้ว

    Very helpful. Many Thanks.

  • @manojsharma-ki1ei
    @manojsharma-ki1ei 5 ปีที่แล้ว

    great help

  • @PAWANJOTKAURBAWEJA
    @PAWANJOTKAURBAWEJA 6 ปีที่แล้ว

    There is an error explained during keys in the video. I guess 68 is for D and 83 is for S, what I being told is opposite of this.

  • @rogerwmwong
    @rogerwmwong 6 ปีที่แล้ว +7

    The part about "followCam" doesn't work. Nothing is shown except a white screen.

    • @Torben43
      @Torben43 6 ปีที่แล้ว +1

      instead of BABYLON.Vector3.Zero() try BABYLON.Vector3(0,0,-10) in the second parameter of BABYLON.FollowCamera()

    • @timgels2918
      @timgels2918 4 ปีที่แล้ว

      @@Torben43 i used new BABYLON.Vector3(0,0,-10). The new keyword works for me.

    • @Jrej_dev
      @Jrej_dev 3 ปีที่แล้ว

      I used new BABYLON.FollowCamera("followCam", BABYLON.Vector3.Zero(), scene, box) putting the locked target in the constructor. Worked this way. ;-)

  • @hammer86_
    @hammer86_ 7 ปีที่แล้ว

    Do you think BabylonJS would be good choice for mobile platforms? I would like to see a demo of that if you're up for it. Thanks.

  • @ClearTheRubble7
    @ClearTheRubble7 4 ปีที่แล้ว

    Kind of an aside about the w, a, s, d camera movements:
    When I tried the First Person Shooter-style camera movements found here--
    doc.babylonjs.com/babylon101/cameras,_mesh_collisions_and_gravity
    --everything worked, except that (while the canvas is not in fullscreen) the down arrow key causes my whole html page to scroll downward while at the same time backing up the first person ellipsoid and the camera it's attached to. The up arrow key would then scroll the page back up into position while moving the ellipsoid forward. When I searched for a way to resolve this, besides using fullscreen (which I don't want to do for my project), I came across the ASCII w, a, s, d code here, tried it, and found that it resolves the scrolling problem. Just in case anyone else has had this problem...
    I should add that w, a, s, d keys, in this FPS camera scene, move the ellipsoid/camera forward, backward and from side to side, instead of up and down, etc.

  • @ryanspivey1819
    @ryanspivey1819 3 ปีที่แล้ว

    I love the sigh every time you have to type BABYLON.function

  • @windysunny8917
    @windysunny8917 4 ปีที่แล้ว +3

    Some Babylon.js API has changed, so some of the codes in the video is deprecated. For example, the "followCam.target" should be "followCam.lockedTarget".

    • @TUNRAX
      @TUNRAX 2 ปีที่แล้ว +1

      You saved me so many troubles, I just had the problem with the target camera, this helped me

  • @timgels2918
    @timgels2918 4 ปีที่แล้ว

    camera.target = box2 doesnt work anymore. Use camera.lockedTarget = box2;

  • @ArdenLOLZ
    @ArdenLOLZ 5 ปีที่แล้ว +1

    the FollowCamera is still not working. what the hell is the problem. i checked doc.babylonjs.com/babylon101/cameras#constructing-a-follow-camera
    it seems like I followed the procedure but still it didn't work
    Also i've read the comments down there and i tried most of them it did not work.

    • @ArdenLOLZ
      @ArdenLOLZ 5 ปีที่แล้ว

      SOrry, fixed. Removed new at new BABYLON.Vector3 and added lockedTarget instead of target.

  • @420moby
    @420moby 5 ปีที่แล้ว

    you said z right

    • @420moby
      @420moby 5 ปีที่แล้ว

      but you said it wrong the first time
      which is zee

  • @ivanenzhaev2373
    @ivanenzhaev2373 6 ปีที่แล้ว

    TypeScript version on Playground: plnkr.co/edit/bqTt2id0l06ObLpDtbZg?p=preview

  • @Richard-pp9jr
    @Richard-pp9jr 4 ปีที่แล้ว

    your tutorial does not work, you can make the change to the video by putting text over it. To not do that is just sloppy.

    • @TheUnderscore_
      @TheUnderscore_ 3 ปีที่แล้ว

      Not sure how it's sloppy, this was made 2 years ago by the time you wrote this.