Rammschnev Posted December 9, 2016 Share Posted December 9, 2016 I'm not sure exactly what's going on with that. Every other component I've tried to use seems to be working, except for the other functions in that family. moveToXY gives the same message. I am using Phaser 2.6.2. I might be able to find some other solution, but it would easily be the most ideal. I'm working on a train project featuring a train that needs to move at a constant rate, so I don't want to use the functions that use acceleration. Here is the line where I call it, but I don't think I'm having a syntax issue: car.engage = function() { car.rotation = Phaser.Physics.Arcade.moveToObject(car, car.destination, car.speed); } Any guidance is appreciated. Update: I figured out the problem by looking through the code examples for Arcade physics. Definitely a user error. For anyone else having the problem, it needs to read: car.engage = function() { car.rotation = game.physics.arcade.moveToObject(car, car.destination, car.speed); } Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.