Project

General

Profile

Bug #301

Scaled bobs not always triggering collision detection

Added by Paul Kitching about 4 years ago. Updated over 3 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

Also available in: Atom PDF