Jump to content
  • Advertisement

Archived

This topic is now archived and is closed to further replies.

SlimShady38

(After) Collision Detection

This topic is 6596 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

This is probably a dumb question...but i''ve asked them before. I have my code set up to tell me when my camera (player) collides with my wall. But now what.......I know i don''t want it to go through the wall...but i''m having a problem figuring out how to make the camera stop or (preferibly) slide on the wall like in most other games. if you need me to i''ll post my source...it''s small....but i''d like some help.....thanks in advance 38

Share this post


Link to post
Share on other sites
Advertisement
quote:
Original post by SlimShady38
I have my code set up to tell me when my camera (player) collides with my wall. But now what.......I know i don''t want it to go through the wall...but i''m having a problem figuring out how to make the camera stop or (preferibly) slide on the wall like in most other games.



You could just translate the camera back through the wall along the wall''s normal. So the steeper the angle of collision, the slower it slides along the wall.

ro

Share this post


Link to post
Share on other sites

  • 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!