Jump to content

Questions on the PixelCodr shooter tutorial


bbmario
 Share

Recommended Posts

I'm following this tutorial on how to create an FPS with Babylon, but i'm stuck with some problems:

  • When the first-person weapon model is too close to a ball or a wall, it gets clipped by the ball/wall model. Is there a way to fix this?
  • How would you guys create this weapon-sway effect on the model? I mean, this:
  • In the tutorial, scene.pick is used instead of a physics raycast. Is this really the way to go?
Link to comment
Share on other sites

Hello bbmario, 

 

Sorry for my late answer :)

 

- I think you can increase the ellipsoid size of the camera in order to include the weapon in it. This way, it won't be clipped by the wall.

 

- I would add a listener on the mousemove, detect the direction between the screen center point and rotate the weapon accordingly. It does not seem easy to do!

 

- scene.pick internally uses a raycast.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...