• 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.
Sign in to follow this  
Followers 0
Kastor372

Linear Velocity and Angular Velocity Point of Intersection

6 posts in this topic

So, I have been studying angular velocity and linear velocity--and I want to use this information determine if a ray intersects a plane.

linear velocity = dp/dt
angular velocity = d?/dt

thus for linear velocity, you have a point in space: the intersection point could be described as

I = Po + rV

(Po) position initial, (I) position final, (V) linear velocity vector, (r) a scalar

then, eloquently you can set it to the plane equation
(Pp) point on plane, (Np) normal of plane

(I - Pp)*Np = 0

I*Np -Pp*Np = 0

by replacing I for the above equation

(Po + rV)*Np -Pp*Np = 0

when worked out you can find r

thus Po plus the velocity vector times a certain scalar will get you the intersection point.
How will this change if you are dealing with angular velocities.

If you guys remember, rotation always stumps me

this guy, in his blog:

http://www.wildbunny.co.uk/blog/2011.../#comment-3697

is talking about adding them together if you have certain info...i tried but I am extremely lost.
Thanks for your time.

0

Share this post


Link to post
Share on other sites

Give me a visual..... From your post, I am envisioning some object floating in space at a set velocity with a laser attached to it and you want to see if the laser is intersecting a plane?????

 

Or are you talking more like a rocket without guidance? Where the rocket spirals uncontrollably and you want to know if it hits a plane?????

 

Looking at the article, I'm wondering how detailed you want this collision detection? It also looks like it's describing 2D.

1

Share this post


Link to post
Share on other sites

[attachment=20802:rotation.png]

 

Alright, I have drawn an image. Yes this is for collision detection. What I want to determine is how much an object would rotate before it hits the plane.

 

All while the vertices(point A, and B) of the rigid body have an angular velocity, and the center of mass is traveling with a linear velocity.

 

So the image is of a stick thrown with a certain angular velocity, and a certain linear velocity. What is the number of rotations it would take for the object to hit the plane in front of it? Essentially, how big has theta become?

0

Share this post


Link to post
Share on other sites

There may be some elegant mathematical way of coming to the answer, but I don't have it. I would break it down into stages:

-points A&B are at a certain length from the center of mass. They may not be the same distance away (though it appears to be in this instance). The farthest away your object's center can be from the plane is the maximum of the two end points and still be colliding. So Ignore any computations until that radius is reached.

-now each frame, do a collision check with A&B separately until one hits the plane. If you want to get the EXACT point of contact, you will have to half-step it backwards toward the previous frame. Each time testing the point that made contact until it no longer does. This will give you a very close approximation of the solution.

 

Sorry I couldn't give you an equation to get to the answer.


What is the number of rotations it would take for the object to hit the plane in front of it?

This could be approximated using the first part of the method mentioned above. But it could also be done mathematically by considering the object to be a circle/sphere because any collision that would occur would take place no farther away than the radius and any collision happening within the radius would have to occur within half a revolution......

0

Share this post


Link to post
Share on other sites

Yea, okay--that could work. But, I just had a thought yesterday. Isnt the motion of an object with angular velocity about its center of mass, a spiral. If that could be defined, then what would be the intersection point of a spiral with a plane.

0

Share this post


Link to post
Share on other sites

It depends on its dimensions. If the center mass is in the center of the object, then it will rotate at the center. If the center mass is near one end, then it will be more of a spiral. Figuring out the radius as mentioned above will have to take into account where the center of mass is and the distance of the farthest part on the object from that center. The object could also be in a near parallel rotation in relation to the plane, but that still wouldn't matter except that the number of rotations before it collided would be greater than if the rotation was perpendicular to the plane.

0

Share this post


Link to post
Share on other sites

Do you need it physically accurate, or do you need it good enough for games?

 

For a game I would give it a collision sphere of about half the length of the stick. When the sphere collides with the plane, you're done.  Sphere/plane collision check is quick and easy, and documented all over the web.  

 

Unless this is some very critical aspect of your game, nobody will care. If the stick spins too far and clips through, nobody cares. If the stick only very nearly approaches the wall before hitting, nobody cares.

 

 

Now, if your game is something like "Knife Toss Pro", you are going to need a better solution. But unless you truly need it, I wouldn't bother.

 

/Edit: but if you did need it, for a quick solution I would do a test with a bounding sphere first to see the earliest time it could collide as a broad pass, then switch to in iterative Newtonian-style solver for the fine detail, subdividing until you get close enough for your needs. For a very detailed solution I would visit a mathematics/physics forum dedicated to that kind of problem. My guess is it takes grad-school level mathematics to solve.

Edited by frob
0

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  
Followers 0