• Announcements

    • khawk

      Download the Game Design and Indie Game Marketing Freebook   07/19/17

      GameDev.net and CRC Press have teamed up to bring a free ebook of content curated from top titles published by CRC Press. The freebook, Practices of Game Design & Indie Game Marketing, includes chapters from The Art of Game Design: A Book of Lenses, A Practical Guide to Indie Game Marketing, and An Architectural Approach to Level Design. The GameDev.net FreeBook is relevant to game designers, developers, and those interested in learning more about the challenges in game development. We know game development can be a tough discipline and business, so we picked several chapters from CRC Press titles that we thought would be of interest to you, the GameDev.net audience, in your journey to design, develop, and market your next game. The free ebook is available through CRC Press by clicking here. The Curated Books The Art of Game Design: A Book of Lenses, Second Edition, by Jesse Schell Presents 100+ sets of questions, or different lenses, for viewing a game’s design, encompassing diverse fields such as psychology, architecture, music, film, software engineering, theme park design, mathematics, anthropology, and more. Written by one of the world's top game designers, this book describes the deepest and most fundamental principles of game design, demonstrating how tactics used in board, card, and athletic games also work in video games. It provides practical instruction on creating world-class games that will be played again and again. View it here. A Practical Guide to Indie Game Marketing, by Joel Dreskin Marketing is an essential but too frequently overlooked or minimized component of the release plan for indie games. A Practical Guide to Indie Game Marketing provides you with the tools needed to build visibility and sell your indie games. With special focus on those developers with small budgets and limited staff and resources, this book is packed with tangible recommendations and techniques that you can put to use immediately. As a seasoned professional of the indie game arena, author Joel Dreskin gives you insight into practical, real-world experiences of marketing numerous successful games and also provides stories of the failures. View it here. An Architectural Approach to Level Design This is one of the first books to integrate architectural and spatial design theory with the field of level design. The book presents architectural techniques and theories for level designers to use in their own work. It connects architecture and level design in different ways that address the practical elements of how designers construct space and the experiential elements of how and why humans interact with this space. Throughout the text, readers learn skills for spatial layout, evoking emotion through gamespaces, and creating better levels through architectural theory. View it here. Learn more and download the ebook by clicking here. Did you know? GameDev.net and CRC Press also recently teamed up to bring GDNet+ Members up to a 20% discount on all CRC Press books. Learn more about this and other benefits here.

Archived

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

norman_106

sliding against wall

4 posts in this topic

I need help with some physics. How do I sliding against wall? Every time there is a collision detected I "stick" to the wall! I was trying to look this topic up in search engines with little results. However, I did come across some sites that suggested using dot product, vectors, and scalars. So I did a little research but I still don’t understand how these concepts are related to my main goal? Can anyone explain how to create the effect of sliding across a wall when there is a collision? Thanks, Norm
0

Share this post


Link to post
Share on other sites
Actually this was one of the articles that found. I can’t get much from it. In the article it states:
Vt += Ni * (-dot(Ni,Vt)-Nd)

Where:
Vt = Desired Target or Destination of Player
Ni = Normal to the plane of impact
Nd = The "D" of the hit poly''s "plane equation"

Is Vt a vector object with X, Y, and Z properties? If not, then how do I convert Vt to get the objects new X, Y, and Z position? And I don’t know what they mean when they explain the value of Nd. Can someone explain or direct me to another article?
0

Share this post


Link to post
Share on other sites
This is an interesting question ...

You should already have a vector where its magnitude is the player's velocity and its (x,y,z) are in the direction of the player's motion.

When you hit the wall, you need to find a second vector that is parallel to the wall: 1) Find two points at the same height on the wall (preferably the top two or bottom two of the wall's polys). 2) Find the vector between them: v = (p2.x-p1.x, p2.y-p1.y, p2.z-p1.z). 3) Find its unit vector and replace v with it.

Now we simply need to find the new vector of movement by projecting the current one onto the vector parallel to the wall: (dot product of u and v) * v. Using this method, the player will not lose his original velocity (he'll just move in a different direction).

To answer your questions regarding the article:
1) Vt is a 3-dimensional vector.
2) Nd = 'd' in the following plane equation for the wall: ax + by + cz + d. The plane equation can be calculated by:

a) Finding 3 points on the plane.
b) Calculating vectors u and v from these, both vectors originating from the same point.
c) Finding the cross product of u and v (the plane's normal).
d) If the cross product = the vector (a,b,c), then the plane equation can be found by:
a(x-x1)+b(y-y1)+c(z-z1)=0. Thus, d = -a*x1 - b*y1 - c*z1.

I hope this helps!

[edited by - mnansgar on August 7, 2002 12:23:57 AM]
0

Share this post


Link to post
Share on other sites

This should help answer your questions:

http://www.peroxide.dk/download/tutorials/tut10/pxdtut10.html
0

Share this post


Link to post
Share on other sites