Jump to content

Curious how to add sloping tiles using Phaser.js Arcade Physics


drunkenoodle
 Share

Recommended Posts

Hello everyone,

I've been looking in to how one might create sloping tiles in Phaser.js and its Arcade physics engine. From what I've done so far, I just basically have two squares moving through the middle of an existing square as an experiment to see if my 'limited' knowledge of maths actually works (see fiddle):

http://jsfiddle.net/drunkenoodle/qLuzv06c/10/.

 

My plan was to simply move a sprite along that same trajectory while ignoring the left and right collisions of the tile...

 

So I gave it a shot and attempted to apply the method to Phaser, although had very little luck doing so. I've checked out a few articles but sadly don't 100% understand them yet, so heading back to them after posting this.

 

I just wondered if anyone else had any luck, and if you may have some pointers on how to go about it.

 

Cheers for your time guys,

-D

Link to comment
Share on other sites

  • 2 years later...

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...