Jump to content

  • Log In with Google      Sign In   
  • Create Account


Lesson 10: Walls


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
1 reply to this topic

#1 SkiFun   Members   -  Reputation: 100

Like
0Likes
Like

Posted 11 January 2012 - 06:29 AM

I am looking a code at lesson 10. When we move in our world, we can walk through walls. I would like to change code, so I can't walk through walls and here I have a problem, because I don't know how to do it. I know how to solve this problem if I have coordinates in code, but here I don't have idea, so I would like to ask you for some help.

Sponsor:

#2 yoelshoshan   Members   -  Reputation: 224

Like
1Likes
Like

Posted 17 January 2012 - 01:08 PM

The usual term for this is "Collision Detection & Response"
Google might provide few nice tutorials, perhaps add the keyword "basic" to your search as well, since this is a rather advanced topic.
If you're new to 3D graphics, It's often best to first learn and/or implement in 2D.

In this specific case, when the user attempts to move, there is a "requested movement vector".
In the "collision detection" step, you check how much of the requested movement vector it's ok to move without hitting any obstacle.
If the allowed move is only partial, a "collision response" should be calculated and added to the allowed move.
For example, to create slide on walls to have a more dynamic gameplay flow (think about doom :) )




Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS