fran Posted January 26, 2015 Share Posted January 26, 2015 Hello, I'm trying to make a game where oponents follow some predefined points. Player is controlled with p2 physics. So far I made some tweens, but the sprites aren't orientating towards the goals and I don't know how can I make opponents collide with player (I can get overlap but need a way to avoid penetration of sprites). I thought on making a waypoint system, but checking distance every update cycle slows a lot the game. Any suggestion on how can I achieve my goal?Regards. Link to comment Share on other sites More sharing options...
redsheep Posted January 27, 2015 Share Posted January 27, 2015 I think that's because the tween is directly changed the x/y position of sprite but not the velocity.If you want to tween sprite around with physics, try arcade physics and set the property 'moves' of body to true. Link to comment Share on other sites More sharing options...
fran Posted January 27, 2015 Author Share Posted January 27, 2015 Hi, thanks for your suggestion. I enabled / disabled the moves property, tween is correctly registering collision with other arcade objects, however I haven´t been able to properly collide with the player (need p2 system on player, as there are irregular colliders around map).Is there a way to check out those kind of collisions? Link to comment Share on other sites More sharing options...
Recommended Posts