Game Development Community

Toggle multiple camera views with keyBind?

by Infinitum3D · in Torque Game Engine · 05/16/2007 (6:08 pm) · 0 replies

What is the best way to KeyBind for camera-view. I'm working on a board game, and I want to have four cameras, one on each side of the board. I think the basic logic goes something like;

If - keypress UpArrow
Then - Camera one active = true //only camera one active
Camera two active = false
Camera three active = false
Camera four active = false

If - keypress LeftArrow
Then - Camera one active = false
Camera two active = true //only camera two active
Camera three active = false
Camera four active = false

If - keypress DownArrow
Then - Camera one active = false
Camera two active = false
Camera three active = true //only camera three active
Camera four active = false

If - keypress RightArrow
Then - Camera one active = false
Camera two active = false
Camera three active = false
Camera four active = true //only camera four active

Am I correct in this way of thinking?

What is a better (i.e. more efficient) way?

Thanks!

Tony