Jump to content
  • Advertisement
iradicator

Free-Look Camera Roll Effect

Recommended Posts

I want to add a subtle roll movement to my fps camera.
I was thinking about something like the following example (0:33).

Should I implement by rolling the camera proportional to the left/right linear movement of the camera + damping? Would love to more ideas.

 

Thanks!
 

 

Share this post


Link to post
Share on other sites
Advertisement

FYI, additional copies of this post keep appearing and disappearing (I've seen them do both while reading the original post). I'm just mentioning it to perhaps draw your (or whoever's) attention to it.

Share this post


Link to post
Share on other sites

I only see this post (and there are no comments other than this).
Can you point me to the other posts and I'll delete dups? Thanks!

Share this post


Link to post
Share on other sites
12 minutes ago, iradicator said:

I only see this post (and there are no comments other than this).
Can you point me to the other posts and I'll delete dups? Thanks!

I think it was probably a glitch. There are no duplicates now, and it doesn't seem to be happening anymore.

I watched the relevant part of the video at quarter speed. Although I don't know exactly what's being done, it looks like a roll is being applied that's proportional to the lateral speed, and is CW from the viewer's point of view when moving left, and CCW when moving right.

That basically echoes what you said, with the additional observation about the direction of the roll (which you may have noticed as well). Maybe someone else will offer something more specific, but I'd probably start by trying what you described in one form or another and see how it turned out. If you wanted to keep it simple initially, you could leave out the damping and just apply a roll that's strictly proportional to lateral speed.

Share this post


Link to post
Share on other sites

As a follow-up, setting the roll to be proportional to the lateral velocity worked extremely well for me. Since the velocity is already calculated to be smooth, no roll interpolation is needed between frames.

Note that in the video it seems like the roll has a component that depends also on the yaw change rate (see 0:35-0:40). I’m really curious to hear more ideas about how to introduce such camera roll.

The subtle added roll has the artistic feeling of speed.

The only gotcha is to “correct” the roll before applying lateral translation (, by removing it before applying translation on the next frame). Otherwise, the translation won’t be parallel to the floor and the control won’t feel good and natural.

Edited by iradicator

Share this post


Link to post
Share on other sites
6 hours ago, iradicator said:

Note that in the video it seems like the roll has a component that depends also on the yaw change rate (see 0:35-0:40). I’m really curious to hear more ideas about how to introduce such camera roll.

It's a nice effect. I can't tell from the video exactly what's going on, but at the risk of suggesting the obvious, have you tried incorporating the yaw velocity similarly to how you're incorporating the lateral velocity? In other words, the total 'roll factor' would be the sum of a contribution from lateral velocity and a contribution from yaw velocity.

Quote

The only gotcha is to “correct” the roll before applying lateral translation (, by removing it before applying translation on the next frame). Otherwise, the translation won’t be parallel to the floor and the control won’t feel good and natural.

It seems like if you were using e.g. 'from scratch' Euler angles, you wouldn't have to do any correction. Also, if you're handling orientation cumulatively and not 'from scratch', it also seems possible that even without roll, error could creep in over time, causing lateral movement to no longer be parallel to the ground plane. I don't know how you're handling rotation and orientation, but it seems at least possible it could be handled in a way that wouldn't require correction.

Edited by Zakwayda

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!