PS : Your 1st solution, that what I made. But, it doesn't works well in the 2nd case
Posts made by Shana
Sticks walls and corners
I got a problem. I'm trying to create a "saw" which is sticks the walls, but i don't know how to make this :
I'm using an FlxTilemap for the level, and I want the saw to go all around the level. I do not know if it's understandable...
Maybe the better is to use FlxPath with raycasts ?
Thanks for your help !
Rotate and move a sprite around a point
Hi ! First, sorry if there are English mistakes, I'm French, so, it's not my mother language you know...
I have some troubles making a portage of my last game never released.
I'm trying to remake this :
I've done it by using Phaser, and i'm trying to remake it by using Flixel this time. But, in Phaser, it was very easy to move a sprite around a point and to make it facing the sprite.
I saw "FlxPoint" and the "rotate" method, so I used it, but it's pretty weird... I'm setting the positions of my sprite on a sprite (a circle basically), so, normally, its top left point should be everytime on the circle, no ? My circle's got a radius of 64, so it's a perfect circle, but when it rotates, It goes beyond the edges...
I'm using this (On Player extends FlxSprite) :
centerPoint = new FlxPoint(640 / 2, 360 / 2);
var p : FlxPoint = this.getScreenPosition();
var np : FlxPoint = p.rotate(this.centerPoint, 2 );
Thanks for your answers.