Project

General

Profile

Bug #865

1 pixel bobs don't have collisions detected

Added by Paul Kitching 14 days ago.

Status:
New
Priority:
Normal
Target version:
Start date:
11/13/2021
Due date:
% Done:

0%

Estimated time:
Affected version:

Description

I use a 1 pixel bob at the mouse x,y to detect collisions with bobs. This stopped working in Beta 10 and is still the same in Beta 11.
If I make the bob 2x2 pixels collisions work.
Make two images in 1.images. 100.pixel1.png and 101.pixel2.png
The first should be a 1x1 pixel and the second is 2x2
If you press space to change between them, you will only get collisions for the larger one.

flash off:curs off
ink 17
bar 10,10,10,10
get image 99,10,10,10,10
bob 1,50,50,99
presstime#=timer
size=100
do
    if inkey$<>"" and timer-presstimer#>1
        add size,1,100 to 101
        presstime#=timer
    end if
    bob 2,x mouse,y mouse,size
    if bob col(2)
        if col(1)
            cls
            locate 0,0:print "hit"
        end if
    else
        cls
        locate 0,0:print "no collision","bob"+str$(size)
    end if
    wait vbl
loop

No data to display

Also available in: Atom PDF