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 / Camera Movement

Author
Message
Jamie Rumbelow
16
Years of Service
User Offline
Joined: 6th Aug 2008
Location: Cambridge, England
Posted: 7th Aug 2008 13:21
Hey,

I've got a peice of code which should move the camera right when the mouse is near the right edge of the screen, but it's not working.

I'm using POSITION CAMERA camerax#, ... to position in my main loop.



Anyone know what's going on?

Thanks,

Jamie

"Great hopes outdwarf skill, for with hope, there is courage and belief, and with courage and belief anything is possible..." - James Elliot
=PRoF=
21
Years of Service
User Offline
Joined: 17th Mar 2003
Location: Milton Keynes, UK
Posted: 7th Aug 2008 16:37 Edited at: 7th Aug 2008 16:39
You need to position the camera again after.

All you are doing above is increasing your camerax# variable.

[edit]
Sorry, didn't read your post properly, can we see some more code? Like your whole main loop? Plz. Would help us to help you.

Without Music or Love the world would be a very empty place... Thank god I still have music.. --'-<@
=PRoF=
21
Years of Service
User Offline
Joined: 17th Mar 2003
Location: Milton Keynes, UK
Posted: 7th Aug 2008 17:02 Edited at: 7th Aug 2008 17:03
I've just gone and fired up my computer (I usually read the forums on my mobile phone, which is why I sometimes miss read them)



This is a quick test I made for your code and it works fine?

I can only suggest that your cam position is out of the range specified by the If line?

Try my code and see how you get on.

Without Music or Love the world would be a very empty place... Thank god I still have music.. --'-<@

Login to post a reply

Server time is: 2024-11-25 18:28:16
Your offset time is: 2024-11-25 18:28:16