Sign in to follow this  
sunilsin

Camera Slide direction

Recommended Posts

Hi all, I am trying to implement devil may cry camera for my game. It work but without collision. now i m trying to make sliding of camera and this is how i am doing it
 Vector MovementDir = m_CamPos - m_CamPrvPos;
 Vector MovementOnNormal = CollisionInfo.normal *   MovementDir.Dot(CollisionInfo.normal);
 Vector SlideDir = (MovementDir - MovementOnNormal);// *3.0f;

now problem is that sometime it work but sometime camera goes inside the objects. i check collision normal and it give me the wrong direction ( may be bcoz camera is already inside ). Is it correct way to do find the sliding direction. how does other game( devil may cry ) do this.

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

Sign in to follow this