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 / help with a sphere and its position

Author
Message
Rye
23
Years of Service
User Offline
Joined: 30th May 2003
Location: United Kingdom, Blackrod
Posted: 24th Aug 2003 01:48
im having a problem trying to get the sphere to stay on the screen. its just a bit of maths but i cant figure it out. ive posted the source. It half works, i want the distance from the camera to the sphere to be constant, but when i look up and down the sphere dissapears off the screen.

You might be thinking "why doesnt he just use lock object"
the answer is that that command is totally screwed. it treats the object as if its co-ordinates are the same as where it was locked to the screen so if you look away somewhere the object in screen command says its not on the screen even tho its plainly visible.
and the co-ords of the locked object never change even when u move the camera.

i'd apreciate it if someone could have a go at changing what ive done so the sphere is always a constant distance from the camera.

thanx

He who keeps his work in disorder gives home to chaos. Let him be struck with stone and iron to forge away his flaws
spooky
23
Years of Service
User Offline
Joined: 30th Aug 2002
Location: United Kingdom
Posted: 24th Aug 2003 03:06
There you go.

The programmer formerly known as sonic
Rye
23
Years of Service
User Offline
Joined: 30th May 2003
Location: United Kingdom, Blackrod
Posted: 25th Aug 2003 18:23
AMAZING

i can continue with making my wand game. You wave your wand in a specific motion to cast spells. Works as well, at first i use the lock obect command an it was fine....until i moved the camera.

thanks mate

Login to post a reply

Server time is: 2026-07-23 00:17:29
Your offset time is: 2026-07-23 00:17:29