The Armor Games website will be down for maintenance on Monday 10/7/2024
starting at 10:00 AM Pacific time. We apologize for the inconvenience.
The Armor Games website will be down for maintenance on Monday 10/7/2024
starting at 10:00 AM Pacific time. We apologize for the inconvenience.
3 | 5290 |
i tried to make sure that when my circle hits the blue platforms(which are in the floors array) that it would stop its gravity
but the character stops his gravity in mid air reguardless like if i was testing the whole level.
for (var i:Number = 0; i < Main.floors.length; i++)
{
if (Main.floors[i].hitTestObject(this))
{
grav = 0;
jumped = false
}
else
{
grav++;
}
}
but im not..im testing the blue platforms in my testlevel...or do i hitTest against the whole class itself?
link//www.mediafire.com/?g7916hzac0xyzit
First guess is that is has to do something with your hittestobject... That function compares the two bounding boxes, not the actual shapes.
I assume 'this' is the character - in which case you'd probably be better off with the hittestpoint function, since that allows for a shapeflag (so it doesn't just test against the bounding box). You'd have to define a point at the bottom of the character's feet though.
I assume 'this' is the character - in which case you'd probably be better off with the hittestpoint function, since that allows for a shapeflag (so it doesn't just test against the bounding box). You'd have to define a point at the bottom of the character's feet though.
In short: yes, you're right, but baby steps...
Nice link though, I hadn't seen that even though I occasionally check Kong - definately warrants a longer read!
You must be logged in to post a reply!