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.

Newcomers DBPro Corner / moving objects: i need help!

Author
Message
Feugsy
20
Years of Service
User Offline
Joined: 1st Nov 2004
Location: Australia
Posted: 6th Nov 2004 09:48
i am having trouble moving objects
when i use this code snippet:
if upkey()=1 then x=x+1
if downkey()=1 then x=x-1
postition object 1,x,y,z
that is an example of the code im using. ive also positioned the camera this way. whenever i move camera with the object in this way the object shakes and has a ghostlike other object next to it. is this just the speed of my game or is there a simpler way to avoid this shaky object whenever it moves

cheers if you can help me

"its about the man beside you. thats all it is" black hawk down
Kivu_Rako
20
Years of Service
User Offline
Joined: 10th May 2004
Location:
Posted: 6th Nov 2004 12:22
im assuming that that snippet is in the do-loop? because if its not then it wont work.
but assuming that it is....
it depends if ur using dbc or dbp
but assuming just in case that its dbc....
try
"
do
if upkey()=1 then move object 1,10
if downkey()=1 then move object 1,-10
set camera to follow object position x(1),object position y(1),object position z(1),*depending on size of object*100,*<*10,0,1
loop
"
this will work, but it doesnt support any strafing or such for when you get later in development, then you have to use math!! unless you are using dbp but u didnt specify... so... if i didnt answer your question tell me.

"geez, its probably a noobish mistake too!"
Feugsy
20
Years of Service
User Offline
Joined: 1st Nov 2004
Location: Australia
Posted: 7th Nov 2004 13:15
yeah thanx thats what i wnated
cheers

"its about the man beside you. thats all it is" black hawk down

Login to post a reply

Server time is: 2024-11-27 15:43:26
Your offset time is: 2024-11-27 15:43:26