Camera "look at" command suggestion

What do you want to see in Armagetron soon? Any new feature ideas? Let's ponder these ground breaking ideas...
Post Reply
User avatar
xevic
On Lightcycle Grid
Posts: 17
Joined: Mon Jun 12, 2006 10:56 pm
Location: Barcelona
Contact:

Camera "look at" command suggestion

Post by xevic »

Hi devs, i was tunning my old custom cam to fit on 0.3 but i find some issues.

But i feel a problem using the "look at" feature (look right, left, behind) it makes a slow turn and also returning back.

I was checking all commands in game and after at the wiki, and i didn't found any parameter to accelerate it (the begining of it). The only way i found is incressing CAMERA_CUSTOM_TURN_SPEED (actually 7 for me) but it ***** all the normal game, and just works at second phase of turning animation.

Then my suggestios is: can you add a new parameter to modify the speed of the animation on the "look at" feature? Something like: CAMERA_LOOK_AT_TURN_SPEED and CAMERA_LOOK_AT_TURN_SPEED_FACTOR

Thx.
Visca el Barça! CUIG (See you in game) and don't forget to sing with us: lalalalala ;)
Image
User avatar
wrtlprnft
Reverse Outside Corner Grinder
Posts: 1679
Joined: Wed Jan 04, 2006 4:42 am
Location: 0x08048000
Contact:

Post by wrtlprnft »

There is a setting named CAMERA_GLANCE_ANGULAR_VELOCITY that affects how fast the camera will turn if you press a glance key, but unfortunately not one to control how fast you go back, this would probably be very hard to add, and even z-man says he doesn't understand the glancing code, and neither do I.
As a temporary fix you can just glance back into the direction you came from to look back forward.
There's no place like ::1
User avatar
xevic
On Lightcycle Grid
Posts: 17
Joined: Mon Jun 12, 2006 10:56 pm
Location: Barcelona
Contact:

Post by xevic »

thx, but is not glance what i mean, i mean just the normal button for look left/right/back, u press it, and it turns to l/r/b and then when u release it, the cam returns to normal, not like glance, the problem i have is that when i release the button it take so much to return no normal position...

in fact i was playing with camera glance parameters, but haven't any effect there.
Visca el Barça! CUIG (See you in game) and don't forget to sing with us: lalalalala ;)
Image
User avatar
wrtlprnft
Reverse Outside Corner Grinder
Posts: 1679
Joined: Wed Jan 04, 2006 4:42 am
Location: 0x08048000
Contact:

Post by wrtlprnft »

Yeah, those are weird. I once tried to find the position in the code they're defined at, but had no success. I wanted to make the speed proportional to the time the key was pressed, so the longer you press the faster it moves.
Anyone any hints? meriton?
There's no place like ::1
meriton
Round Winner
Posts: 256
Joined: Sun Nov 20, 2005 3:33 am

Post by meriton »

All camera keys are handled in eCamera::Act and influence member variables that are used to compute the next camera state in eCamera::Timestep. I haven't looked at the look keys as my survey said few people use them. I faintly recall there to be a set of instance variables called something like "userControl" that govern the balance of force between non-glancing manual controls and autmatic camera control. If you make them return to their initial value faster, this should result in a quicker snap back.

Slightly off-topic:
but unfortunately not one to control how fast you go back, this would probably be very hard to add,
I agree; I would not attempt this prior to a major refactoring of the camera control logic. It is a nice suggestion for future enhancement, though.
and even z-man says he doesn't understand the glancing code, and neither do I.
It shouldn't be that complex, though I admit using pointer arithmetic to map glance actions to glance requests was a bit over the top ;-) If this is an issue I might be able to find an hour or so to explain how it works. Contact me if this is needed.
User avatar
xevic
On Lightcycle Grid
Posts: 17
Joined: Mon Jun 12, 2006 10:56 pm
Location: Barcelona
Contact:

Post by xevic »

thx both, then i hope it can be added in a future version, until then i will have to live with it :P
Visca el Barça! CUIG (See you in game) and don't forget to sing with us: lalalalala ;)
Image
Post Reply