Project

General

Profile

Actions

Bug #301

closed

Scaled bobs not always triggering collision detection

Added by Paul Kitching over 4 years ago. Updated over 4 years ago.

Status:
Closed
Priority:
Normal
Target version:
Start date:
03/11/2020
Due date:
% Done:

0%

Estimated time:
Affected version:

Description

When I scale a bob, the detection isn't being detected. I've attached an example (with test bobs), but here is the code:

#manifest: "pc"
#displayWidth:1920
#displayHeight:1080
#fullScreen:true
#fps:false
#splashScreen:false
by=1
by2=10
do
  cls
  bob 1,10,by,1
  if mouse key=1 then bob scale 1,100,1:by2=80
  bob 2,by2,10,2
  if bob col(2) then locate 1,5:print "HIT"
  wait vbl
  inc by
  if by>100 then by=1
Loop

IMPORTANT! Press the mouse button to activate the scaling. When it first runs it detects the collisions, then when you press the mouse, it doesn't.


Files

ColDetection.aozip (3.11 KB) ColDetection.aozip Paul Kitching, 03/11/2020 06:19 PM
Desktop 2020.04.16 - 06.47.31.01.mp4 (2.81 MB) Desktop 2020.04.16 - 06.47.31.01.mp4 Francois Lionet, 04/16/2020 04:49 AM
Actions #1

Updated by Paul Kitching over 4 years ago

In further tests, if I check for a collision at the beginning position (as though it isn't scaled), I'm getting an internal error.

Actions #2

Updated by Paul Kitching over 4 years ago

  • Affected version changed from 0.9.6.3 to 0.9.7

It's now detecting okay for positive numbers, but not negative.

You'll need a couple of bobs to test this.

#manifest: "pc"
#displayWidth:1920
#displayHeight:1080
#fullScreen:true
#splashScreen:false
#fps:false

for y=50 to 250
    cls
    bob 1,100,y,1
    bob 2,150,100,2
    bob scale 1,10,1
    if bob col(2,1) then locate 1,1:print "hit"
    wait vbl
next y
for y=50 to 250
    cls
    bob 1,600,y,1
    bob 2,550,100,2
    bob scale 1,-10,1
    if bob col(2,1) then locate 1,1:print "hit"
    wait vbl
next y
end
Actions #3

Updated by Baptiste Pillot over 4 years ago

  • Affected version changed from 0.9.7 to 0.9.6.4
Actions #4

Updated by Francois Lionet over 4 years ago

Works in 0.9.8, see video.

Actions #5

Updated by Paul Kitching over 4 years ago

  • Status changed from Resolved to Closed
Actions

Also available in: Atom PDF