Jump to content
  • Advertisement
Sign in to follow this  
sunilsin

Camera Slide direction

This topic is 3507 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

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
Advertisement
Sign in to follow this  

  • Advertisement
×

Important Information

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

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!