Actions
Bug #301
closedScaled bobs not always triggering collision detection
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
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.
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
Updated by Baptiste Pillot over 4 years ago
- Affected version changed from 0.9.7 to 0.9.6.4
Updated by Francois Lionet over 4 years ago
- File Desktop 2020.04.16 - 06.47.31.01.mp4 Desktop 2020.04.16 - 06.47.31.01.mp4 added
- Status changed from New to Resolved
- Target version set to 0.9.8.1
Works in 0.9.8, see video.
Updated by Paul Kitching over 4 years ago
- Status changed from Resolved to Closed
Actions