Flixel Forums

development => help => Topic started by: Liaf on Sun, Feb 21, 2010

Title: Colliding FlxTileblocks and FlxSprites
Post by: Liaf on Sun, Feb 21, 2010
Well it doesn't work. I tried to program a moving FlxTileblock which should just push my player (FlxSprite). But like every 10th time the tileblock is just passing through my player without ever colliding.
The Tileblocks width is 50 px, the height 10px and the loaded Image is 10x10 px (Don't know if this somehow matters)
Title: Re: Colliding FlxTileblocks and FlxSprites
Post by: Bennett on Sun, Feb 28, 2010
same problem here.
Title: Re: Colliding FlxTileblocks and FlxSprites
Post by: Rybar on Sun, Feb 28, 2010
Try using a FlxSprite instead, make sure to set fixed =  true.
Check out the source for FlxCollisions, he has pushers/moving platforms in there:

http://github.com/AdamAtomic/FlxCollisions/blob/master/src/Pusher.as

Also check out Elevator.as.