Quantcast
Channel: 2D Latest Topics
Viewing all articles
Browse latest Browse all 623

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

$
0
0

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


Viewing all articles
Browse latest Browse all 623

Trending Articles