Joshua Red

Members
  • Content Count

    3
  • Joined

  • Last visited

Everything posted by Joshua Red

  1. Hi there, I'm currently building a FPS game with babylon.js (love the engine <3) and sometimes the player has a sniper rifle, and when they scope I would like to: 1. Have the UniversalCamera zoom in. 2. Decrease the UniversalCamera's angularSensibility (pan around slower). 3. Overlay a recticle image. Right now I know how to do 2 & 3 but not 1. I've looked around, searching for a way for the camera to zoom in but without luck. I'm wondering if BJS has a function for this, or if not, is there some other way I can achive this? If any of you guys know how I can achive this please let me know, thanks. PS. I haven't posted any code since I think this is a general question, let me know if you want the code though.
  2. Hi NasimiAsl, thank you for your reply. What I was intending to do is if you're walking forward and you walk into a ladder then it would automatically start moving you up the ladder, like how ladders are in Minecraft. I could use your suggestion and transport them to the top instantly (or use a animation) but it would be nice if I could jump off the ladder half way.
  3. Hi, I'm trying to make an FPS game, and right now I'm attempting to make climbing up ladders possible. What I've tried so far is to have an `onCollide` event move the camera up a bit, but gravity pushes it down again, so I disable gravity when you move up: camera.onCollide = function(collidedMesh) { if (collidedMesh.id === 'ladder') { camera.applyGravity = false; camera.position.y += 0.02; } }; But then I have to turn gravity on again afterward. So when it stops colliding I want to enable gravity again, but I can't find the right event to use. Do you guys know anything else I can try?