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 / How to reverse controls?

Author
Message
Levanthus
21
Years of Service
User Offline
Joined: 17th Apr 2003
Location: Cumbria, UK
Posted: 29th Apr 2010 22:50 Edited at: 29th Apr 2010 22:56
ok simple question, i have this here program (attached with media)



all i want to do quite simple is when the camera changes view i want the controls to reverse with it, i have tried a few ways, but they don't really seem to work

*edit*
by the way if you do have a look at the thing running, you need to hit the ghost cylinder first, and there are alot of controls in the programming that i was tryng, but didn't use but haven't taken them out yet, eg: the mouse.

Windows 7 64 bit, AMD Phenom II x4 Black edition, 4 GB Ram, Radeon HD 4650, 540 GB HDD

I can see from your smile, you're not here for the sunset.

Attachments

Login to view attachments
luskos
17
Years of Service
User Offline
Joined: 28th Jun 2007
Location:
Posted: 1st May 2010 01:00
So you basicly need to check when the camera change it`s view and when this happend you swap controls.It`s easy, just remap the keys you used, up goes down and down goes up, left is right and the oposite.I`ve tried your program and you allready have a bug, when you make the ball smaller and if you die, you get new big ball but it can go thru the wall.And once i hold some of movment keys and while the ball falls it goes away from the level, this caused crash.

Where there is a will, there is a way.
I often edit my posts, that`s who i am
Levanthus
21
Years of Service
User Offline
Joined: 17th Apr 2003
Location: Cumbria, UK
Posted: 1st May 2010 01:26
yeah after i posted it i actually fixed those problems but thanks for pointing them out anyway., i did try remapping the keys but for some reason the way i tried didn't work, maybe i'll try a few other ways... i just figured there might be a quicker way

Windows 7 64 bit, AMD Phenom II x4 Black edition, 4 GB Ram, Radeon HD 4650, 540 GB HDD

I can see from your smile, you're not here for the sunset.
Dia
19
Years of Service
User Offline
Joined: 16th Jan 2005
Location:
Posted: 1st May 2010 05:40 Edited at: 1st May 2010 05:41
if you invent a seperate variable to keep track of the camera switch, and assign it a value of +1 if the camera is normal, but -1 when the camera is flipped. Then use that variable as a multiplier for your movement code

something like:



I *think* that is the sort of thing you are trying to achieve

This is not the Sig you are looking for....
luskos
17
Years of Service
User Offline
Joined: 28th Jun 2007
Location:
Posted: 2nd May 2010 18:53
Other option is to use 2 cameras + you swap between them and check which camera is in use,accordingly to this you use the controls you need, normal or reversed.

Where there is a will, there is a way.
I often edit my posts, that`s who i am

Login to post a reply

Server time is: 2024-11-24 17:27:44
Your offset time is: 2024-11-24 17:27:44