Author Topic: Flixel Collisions Bug [NEED HELP]  (Read 840 times)

hamedn

  • Member
  • **
  • Posts: 45
  • Karma: +0/-0
    • View Profile
Flixel Collisions Bug [NEED HELP]
« on: Thu, Jul 29, 2010 »
I've made a complete game with flixel, so it's not like i haven't worked with collisions and all of that good flixel stuff before ;)

So anyways, I have a game where you move around, and I'm trying to position little wall objects. I'm basically either using loadGraphic() or createGraphic() and colliding the player with the objects.

The wierd thing is, collisions only work on the object when it's coordinates are within (640,480) (stage boundaries).
 
For example

myObject.x = 600
myObject.y = 0
myObject.createGraphic(100,100)


This works fine, but the player only collides with the first 40 pixels of myObject. After that, it just passes right through. But if I move the objects 60 pixels over, everything is alright!

So basically, collisions only occur when the object is originally in the stage's boundaries.

I have had numerous mods of flixel to meet my needs, but none have been collision-based.

I'm also using the camera to track the player...


Am I doing something wrong or is there a flixel bug?

zez

  • Active Member
  • ***
  • Posts: 203
  • Karma: +0/-0
    • View Profile
    • Devlog
Re: Flixel Collisions Bug [NEED HELP]
« Reply #1 on: Thu, Jul 29, 2010 »
FlxU.setWorldBounds(0, 0, gameworld width, gameworld height);?