Yes there does appear to be a problem there, it's not registering the scaling at all.
Firstly using 'fix object pivot' seems to invert some of the object sizes, object size x() returns negative results, which is what the dll uses to work out if an object has been scaled. But still, removing the fix object pivot doesn't seem to fix the scaling problem (it does solve the problem in the latest version I've sent to TGC).
Until that version is released the best work around I can suggest is to re-setup the object instead of updating it. This will grab the new vertex positions so you don't have to use allowObjectScaling
sync on
sync rate 60
dim points(4,1000) as float
global player_x
global player_y
global ret1 as float
global ret2 as float
add_line(100,200,400,100)
make object plain 1,100,100
`make object box 1,10,100,10
make object plain 2,0,0
xrotate object 1,270
fix object pivot 1
setupObject 1,0,2
`allowObjectScaling 1
make object cube 3,5
make object cube 4,5
do
oplayer_x=player_x
oplayer_y=player_y
player_x=mousex()
player_y=mousey()
run_collision(player_x,player_y,oplayer_x,oplayer_y)
ink rgb(255,0,0),0
circle player_x,player_y,4
ink rgb(255,255,255),0
line player_x,player_y-20,player_x,player_y
line player_x-8,player_y-15,player_x+8,player_y-15
position camera player_x,player_y,200
point camera player_x,player_y,0
zrotate camera 180
inc f
points(3,1)=400+sin(f)*50
draw_col()
sync
loop
function run_collision(x#,y#,ox#,oy#)
for colp=1 to points(0,0)
centerx#=(points(1,colp)+points(3,colp))/2
centery#=(points(2,colp)+points(4,colp))/2
position object 3,x#,y#,0
position object 4,ox#,oy#,0
position object 1,centerx#,centery#,0
point object 1,points(1,colp),points(2,colp),0
scale object 1,100,dist(points(1,colp),points(2,colp),points(3,colp),points(4,colp)),100
`UpdateObject 1
setupObject 1,0,2
io=intersectObject(1,0,ox#,oy#,0,x#,y#,0,0)
`io=intersect Object(1,ox#,oy#,0,x#,y#,0)
if io>0
cls
endif
next colp
endfunction
Function dist(x1#,y1#,x2#,y2#)
VX# = X2# - X1#
VY# = Y2# - Y1#
V# = sqrt(VX#^2 + VY#^2)
Endfunction V#
function draw_col()
for colp=1 to points(0,0)
circle points(1,colp),points(2,colp),4
circle points(3,colp),points(4,colp),4
line points(1,colp),points(2,colp),points(3,colp),points(4,colp)
circle (points(1,colp)+points(3,colp))/2,(points(2,colp)+points(4,colp))/2,3
next colp
endfunction
function add_line(x1,y1,x2,y2)
points(0,0)=points(0,0)+1
temp=points(0,0)
points(1,temp)=x1
points(2,temp)=y1
points(3,temp)=x2
points(4,temp)=y2
endfunction
end
delete memblock 1
There should be very little overhead in doing this for box objects.