You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to haxef...@googlegroups.com
Is there a way to use FlxObject.Floor for collision if you don't have a tile map? I want to check to see if an object is touching the floor and if so I want the object to move. I don't have a tile map, so I'm not sure if that is the problem. I'll add the code below...
As you can see I commented out the one way I know how to do it, just wanted to see if there was a better way to do it, because then this code is redundant and I can just use isTouching() or justTouched(). I've tested both of these and neither one works, hence the above code and flag.
Sebastian Fernandez
unread,
Apr 1, 2015, 11:02:03 AM4/1/15
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to haxef...@googlegroups.com
I used a FlxSprite which represents the floor. Then you can use FlxG.collide(this,floor) and check this.isTouching(FlxObject.Floor). If true then move your object. Collide also separate the object from the floor, so you should set floor.immovible=true to avoid the floor from gain any velocity in case of collision.