charlie_says Posted September 19, 2016 Share Posted September 19, 2016 I'm just trying out a further test with @lewster32's iso plug-in. I was experimenting with making fixed tiles (well cubes), if you try this demo: http://rotates.org/phaser/iso/examples/character.htm and add cube.body.moves = false then update and jump on any of the blocks, you see the effect: the player cube sinks... Have I tried to make a solid cube the wrong way? Or, is something funny happening in the plug-in? Link to comment Share on other sites More sharing options...
charlie_says Posted September 19, 2016 Author Share Posted September 19, 2016 I did wonder if it should be cube.body.immovable = true; but this causes other strange behaviour. Link to comment Share on other sites More sharing options...
lewster32 Posted September 19, 2016 Share Posted September 19, 2016 body.immovable = true is the correct one to use and seems to work fine for me, though I think there may be a raft of issues related to incorrect separation on the z axis that I currently don't have time to fix. I may be able to look at it this week and put out a new bugfix release... fingers crossed! Link to comment Share on other sites More sharing options...
charlie_says Posted September 19, 2016 Author Share Posted September 19, 2016 Yeah, I thought immovable might be correct, as I'd made (ha! copied & reworked) a platform demo which used it. if you give me a heads up about what the issues are I'll see if I can fix it. -- is it all related to the reversed z-axis? Link to comment Share on other sites More sharing options...
charlie_says Posted September 20, 2016 Author Share Posted September 20, 2016 Ah - yes, I was getting mixed up between your demo, and mine... body.immovable = true; does work, but as per my previous issue this then affects the jumping as body.touching never changes (so sitting on top of an immovable cube is body.touching.none = true!!) <edit> Further experimentation shows that touching does get set to true (at least initially) but for some reason the bodies are stuck together - manually moving the jumping body a couple of pixels enables the jump. </edit> <edit2> And the sticking isn't limited to z axis... </edit2> Link to comment Share on other sites More sharing options...
Alexalten Posted September 20, 2016 Share Posted September 20, 2016 Hi, I had the same problem....... checking different post on this forum, maybe I've found a solution (it works for me): game.physics.isoArcade.collide(obstacleGroup, null, function(a, b) { if ((a === player)) { b.body.moves = false; } if ((b === player)) { a.body.moves = false; } }); try it, maybe it works also for you. Link to comment Share on other sites More sharing options...
charlie_says Posted September 20, 2016 Author Share Posted September 20, 2016 I didn't set it as you did, in the collision check, but added it the creation: cube.body.moves = false; cube.body.immovable = true; - this doesn't resolve the sticking to the top edge - but I've adjusted my jump code to: player.body.z += 2; player.body.velocity.z = 250; which "unsticks" it... so, all in all, I've got something working, it just feels a little 'hacky'. Link to comment Share on other sites More sharing options...
Recommended Posts