Rigid Body Dynamics for Video Games: Calculating Velocity Vectors

Click For Summary

Discussion Overview

The discussion centers around the calculation of velocity vectors for joints in a rigid-body physics system, specifically in the context of video game development. Participants explore the implications of angle restrictions on joint movement and the resulting dynamics of the system.

Discussion Character

  • Technical explanation
  • Conceptual clarification
  • Debate/contested

Main Points Raised

  • One participant describes a method for calculating joint positions using initial velocity vectors but encounters challenges with angle restrictions between joints.
  • Another participant suggests that if the angle should remain constant, the velocities of the joints should be equal, proposing that v = v_{1} = v_{2}.
  • A subsequent reply questions the initial suggestion, indicating that the entire body should rotate until it stabilizes, implying that the motion is more complex than maintaining equal velocities.
  • A further contribution outlines a method for specifying the motion of a rigid body using a reference point and angular velocity, introducing a formula for calculating the velocity of any point based on these parameters.
  • A participant expresses confusion regarding how to determine the axis of rotation and angular velocity, indicating a gap in understanding the proposed method.

Areas of Agreement / Disagreement

Participants do not reach a consensus on the correct approach to calculating the velocity vectors under angle restrictions, with multiple competing views and unresolved questions about the dynamics involved.

Contextual Notes

There are limitations regarding the assumptions about the rigid body's behavior under constraints, the definitions of angular velocity and axis of rotation, and the clarity of the proposed methods. The discussion does not resolve these aspects.

Vasco_F
Messages
3
Reaction score
0
Hi,

I'm developing a video game, in which I'm making a charactar with rigid-body physics (sometimes called "ragdoll" physics). The way I've made it is probably not completely realistic, because I only use velocity vectors to calculate the position of each joint of the "ragdoll", based on an initial velocity vector applied to a joint. If you want to check it out, you can download it http://mega.ist.utl.pt/~vbfr/Ragdoll.zip"

The way I do this is illustated in this image http://mega.ist.utl.pt/~vbfr/noangle.png"Anyway, the problem I have now is how to calculate the velocity vector of joints that make an angle that is restricted (an angle that shouldn't get any bigger, for example). Please see this simplified diagram that illustrates my problem: http://mega.ist.utl.pt/~vbfr/angle2.png"

In the diagram, how should I calculate vectors v1 and v2? Note that in the diagram, the entire body should be rigid, because of the angle restriction.

I would truly appreciante any help on this...
 
Last edited by a moderator:
Physics news on Phys.org
If I understand the problem correctly, that the indicated angle should remain constant? Then solution is simply;

\vec{v} = \vec{v_{1}} = \vec{v_{2}}
 
That's what I though at first, but that's not correct because the whole body should rotate, until the rotation stabilizes when the body is in kind of a horizontal position (I don't know how to explain it better but if you don't understand I'll draw a diagram). Imagine you have something shaped like a "V" on a table and you drag one end.
 
The motion of a rigid body can be specified by giving:

1) the motion of a specific point (pick a point, say for instance point 1, and use it as a reference).

2) the angular velocity of rotation (done by specifying an axis of rotation and an angular velocity, i.e. a vector \hat{\omega}.

The formula for the velocity v_i of any point with coordinates r_i will be:

<br /> v_i = v_{ref} + \hat{w} \times (r_i - r_{ref})<br />

v_{ref} is the velocity of the reference point
r_{ref} are the coordinates of the reference point
r_i - r_{ref} is the difference in coordinates between the reference point and the arbitrary point r_i which has the velocity v_i.

Hopefully you are familiar with the vector cross product, if not try reading

http://en.wikipedia.org/wiki/Cross_product

and ask questions as needed.
 
Thank you!

I just didn't understand one thing, how do I know what's the axis of rotation and angular velocity?
 

Similar threads

  • · Replies 4 ·
Replies
4
Views
2K
  • · Replies 3 ·
Replies
3
Views
1K
  • · Replies 2 ·
Replies
2
Views
2K
  • · Replies 6 ·
Replies
6
Views
2K
  • · Replies 2 ·
Replies
2
Views
10K
  • · Replies 19 ·
Replies
19
Views
2K
  • · Replies 10 ·
Replies
10
Views
9K
  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 4 ·
Replies
4
Views
2K
  • · Replies 5 ·
Replies
5
Views
3K