Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

DarkBASIC Professional Discussion / object screen x() giving inaccurate data

Author
Message
fatbiffa
23
Years of Service
User Offline
Joined: 15th Jan 2003
Location:
Posted: 21st May 2003 13:19
I'm loop a bit of code with an object not moving in 3d space, geting the 'object screen x' and y' positions and pasting a sprite to that 2d space on screen. I'm revolving the object, but the sprite is being pasted all over the place!

variables: threesixty loops 0-360, spin_speed inc up to 70 then stays there

yrotate object 5500,-threesixty*spin_speed
scale object 5500,50+spin_speed,100,50+spin_speed
x=object screen x(100) : y=object screen y(100)
scale sprite 77,spin_speed
rotate sprite 77,threesixty*spin_speed

any clues chaps?
heart of gold, nerves of steel, nob of butter
fatbiffa
23
Years of Service
User Offline
Joined: 15th Jan 2003
Location:
Posted: 22nd May 2003 16:29
hey you dork - make sure you've OFFSET your sprite 1/2 the x and y size or it will revolve around 0,0!

yup, sorry folks, I worked it out myself ;0)

heart of gold, nerves of steel, nob of butter

Login to post a reply

Server time is: 2026-07-12 01:02:40
Your offset time is: 2026-07-12 01:02:40