Frisbee
-
- Posts: 2
- Joined: Tue Jul 24, 2012 11:31 pm
Frisbee
Hey, what would be the best way to implement the forces required to simulate a frisbee? I need to be able to throw the frisbee in my game and it have the predictable path a frisbee is known for, as well as function realistically when the frisbee is thrown poorly or is rolling on the ground, etc. Thanks!
Re: Frisbee
The exact physics behind the behavior of a frisbee are a bit tricky- there's not a simple equation (that I'm aware of) to refer to like the Magnus effect for spinning balls in flight.
While the engine will take care of the rigid body dynamics, it will be up to you to figure out the extra aerodynamic forces. Approximating some behaviors wouldn't be too hard- a frisbee is clearly going to have a harder time moving along its vertical axis (perpendicular to its wide surface), so exerting some extra drag forces there would be easy enough. You could probably go a long way with these sorts of not-quite-accurate-to-reality hacks.
For all the more complex realistic behaviors, I'd recommend googling around- there's likely some frisbee aficionados out there
While the engine will take care of the rigid body dynamics, it will be up to you to figure out the extra aerodynamic forces. Approximating some behaviors wouldn't be too hard- a frisbee is clearly going to have a harder time moving along its vertical axis (perpendicular to its wide surface), so exerting some extra drag forces there would be easy enough. You could probably go a long way with these sorts of not-quite-accurate-to-reality hacks.
For all the more complex realistic behaviors, I'd recommend googling around- there's likely some frisbee aficionados out there

-
- Posts: 2
- Joined: Tue Jul 24, 2012 11:31 pm
Re: Frisbee
Hm... not the easy and encouraging response I was hoping for... (space.EnableAerodynamics = true;)
Alright, well the good news is that I can hack most of the complicated equations because I know the frisbee's shape and dimensions. I have been contemplating how to go about simulating the needed forces:
Gyro Stabilization - Spinning faster on one axis stabilizes spin on other axes (Need advice on how to do this)
Magnus Effect - A force is applied at the cross product of the direction of velocity and the axis of rotation and the force is scaled by the angular velocity and linear velocity.
Lift/Drag - We figure out the angle of the frisbee by getting the dot product of the normalized velocity and the up of the frisbee then apply a force towards the up vector of the frisbee that is scaled by the angle and the velocity.
Angular lift? - I'm thinking I would also need to apply a change in angular velocity so that it changes its rotation as it flies.
Would this be all of the forces that I need? Are my thoughts for implementation correct? I took physics in high school and college but I'm certainly not an engineer.
Alright, well the good news is that I can hack most of the complicated equations because I know the frisbee's shape and dimensions. I have been contemplating how to go about simulating the needed forces:
Gyro Stabilization - Spinning faster on one axis stabilizes spin on other axes (Need advice on how to do this)
Magnus Effect - A force is applied at the cross product of the direction of velocity and the axis of rotation and the force is scaled by the angular velocity and linear velocity.
Lift/Drag - We figure out the angle of the frisbee by getting the dot product of the normalized velocity and the up of the frisbee then apply a force towards the up vector of the frisbee that is scaled by the angle and the velocity.
Angular lift? - I'm thinking I would also need to apply a change in angular velocity so that it changes its rotation as it flies.
Would this be all of the forces that I need? Are my thoughts for implementation correct? I took physics in high school and college but I'm certainly not an engineer.
Re: Frisbee
Easier than you might think! It's pretty much automatic. Try this in the demos:Gyro Stabilization - Spinning faster on one axis stabilizes spin on other axes (Need advice on how to do this)
Code: Select all
CompoundBody top = new CompoundBody(new[]
{
new CompoundShapeEntry(new ConeShape(1, 1), Quaternion.CreateFromAxisAngle(Vector3.Forward, MathHelper.Pi)),
new CompoundShapeEntry(new CylinderShape(.5f, .2f), new RigidTransform(new Vector3(0, 0.5f, 0), Quaternion.Identity))
}, 10);
top.AngularDamping = 0;
top.AngularVelocity = new Vector3(0, 100, 0);
top.Position = new Vector3(0, 5, 5);
Space.Add(top);
Code: Select all
MotionSettings.UseRk4AngularIntegration = true;
MotionSettings.ConserveAngularMomentum = true;
The direction of the velocities does not need to be computed here; the cross product can take the linear velocity and angular velocity directly. An arbitrary scalar can be applied to tune the result; my guess is that it will end up being fairly tiny for a frisbee.Magnus Effect - A force is applied at the cross product of the direction of velocity and the axis of rotation and the force is scaled by the angular velocity and linear velocity.
That would be a decent approximation.Lift/Drag - We figure out the angle of the frisbee by getting the dot product of the normalized velocity and the up of the frisbee then apply a force towards the up vector of the frisbee that is scaled by the angle and the velocity.
Angular lift? - I'm thinking I would also need to apply a change in angular velocity so that it changes its rotation as it flies.
Applying an impulse a bit off center to represent lift will introduce angular motion without having to worry about a separate force. This is an approximation of how reality works- the lift force is distributed over the surface, but not perfectly uniformly. Instead, the net force ends up being a bit ahead of the center of mass. The imbalance tilts the frisbee.
Of course, there's comes a point where a level of approximation must be decided on. Using some parts of a detailed approximation and some parts of a much more relaxed approximation could result in noticeably non-frisbeelike behavior. For example, including only one part of 'realistic' angular motion from lift forces could end up requiring other details to balance out the behavior and prevent constant looping.
Unfortunately, I have no special insights about frisbees. I did not play with them enough to gather a detailed appreciation for all of their subtle workingsWould this be all of the forces that I need?

How much you 'need' depends on what your goals are. I'd recommend just trying out some implementations and seeing how they feel. If something seems to be missing, google around for the mechanics of frisbee flight and try to fill in the gap.