ChubbRck Posted April 15, 2014 Share Posted April 15, 2014 Hi all, Apologies for what is sure to be a noob question, but I'm trying to switch from Arcade physics to Ninja physics and finding some things that I expected to work properly are not - For instance, I enable a simple AABB physics object by basket = game.add.sprite(game.world.centerX, game.world.height - 100, 'basketimage');game.physics.ninja.enableAABB(basket);..which seems to give the object physics properties and it immediately falls offscreen due to gravity. I try and adjust properties such asbasket.body.drag.x = 50;basket.body.maxVelocity.x = 250;basket.body.gravity.y = 0;... to no avail. I get error messages such as "Cannot set property 'y' of undefined Does anyone know what I'm doing wrong? Am I adding/enabling a physics body incorrectly? Thanks for your assistance. Link to comment Share on other sites More sharing options...
rich Posted April 15, 2014 Share Posted April 15, 2014 You're just trying to set properties that don't exist basically. Link to comment Share on other sites More sharing options...
ChubbRck Posted April 16, 2014 Author Share Posted April 16, 2014 Ah, yes, I see, those properties don't exist for Ninja physics. I assumed they would mimic arcade physics - thanks for the help. Link to comment Share on other sites More sharing options...
Recommended Posts