Topic: [bug]look left collision detection

Hello, I have noticed some odd behavior when the commands look_left or look_at_player (when the player is to the left of the object) are combined with on_collision statements.

Below, I have provided an image which illustrates this point:
http://dl.dropbox.com/u/22535351/diagram.png

In the above image, look_right is demonstrated in the top example and look_left in the bottom.  NOTE: To properly view this image, right click it and press show in new tab.

Last edited by lunarrush (2012-01-11 07:59:52)

If I knew then what I know now I'd tell you that the story's true.  Cause whatever you do, it comes back to you.  -Slaughter, Burning Bridges

Re: [bug]look left collision detection

i don't understand the problem very well, but i guess you might have a bad positioned hot spot in there.

Re: [bug]look left collision detection

Alexandre wrote:

i don't understand the problem very well, but i guess you might have a bad positioned hot spot in there.

The problem is look_left makes your collision still act as if it is on 'look_right'. So even if the object is facing left, the object still collides as if it is facing to the right, causing it to collide with air a lot of times and not with the object itself.

So basically: Pixel perfect collision does not work with looking left.

EDIT: And yet it does with on_player_collision, but not just on_collision. Odd.

Last edited by SilverstepP (2012-01-12 00:23:18)

Re: [bug]look left collision detection

dude, he's right... weird stuff happend when i tried this... neutral

hope to see this fixed soon too! big_smile

Re: [bug]look left collision detection

can you provide an object?

Re: [bug]look left collision detection

Download leftbug.zip

object "Left Bug test"
{
    requires 0.2.0
    always_active
    category "Bugfixing"
    state "main"
    {
        set_animation "SD_LEFTBUG" 0
        set_absolute_position player_xpos() player_ypos()
        look_left
        on_collision "Left Bug test 2" "Stop"
    }
    state "Stop"
    {
        play_sample "samples/jump.wav"
        set_absolute_position player_xpos() player_ypos()
        on_collision "Left Bug test 2" "Stop"
        change_state "main"
    }
}

object "Left Bug test 2"
{
    requires 0.2.0
    always_active
    category "Bugfixing"
    state "main"
    {
        set_animation "SD_LEFTBUG" 0
    }
}

This causes the sample 'jump' to play when the two objects collide. One attaches to the player and one remains still. One of them is looking left. You'll wind up having the sample play without the two actually touching one another.

Re: [bug]look left collision detection

ok

it will be fixed after i find time to improve the camera.

Re: [bug]look left collision detection

Sorry about not being much help on the camera by the way.  I believe it would probably be a bit easier if I knew A4 enough to provide an engine hack to do it, I do believe the engine works faster than the scripting language does, not to mention having direct access to the movement of the screen buffers would be nice.  Either way, it is A5 that I am currently teaching myself, and looking at the differences between it and A4 I am quite certain that I don't want to learn them concurrently.

If I knew then what I know now I'd tell you that the story's true.  Cause whatever you do, it comes back to you.  -Slaughter, Burning Bridges