Hi Creators,
We’re excited to announce the release of FluidForceSensor, a powerful new tool for creators working with aerodynamics. This sensor, which works both in Studio & in-experience, allows you to measure forces, torques, and the center of pressure for aerodynamic assemblies, making it easier than ever to design, debug, and fine-tune your creations.
What is the FluidForceSensor?
The FluidForceSensor is a new instance that enables creators to measure the aerodynamic properties of an assembly, including aerodynamic forces, aerodynamic torques, and the center of pressure. It provides two key ways to access this data:
Reading the Force
, Torque
, and CenterOfPressure
properties of the sensor returns the corresponding values for the assembly at the last physics simulation frame.
You can also call the EvaluateAsync
function with specified linear and angular velocities, as well as a coordinate frame, to get aero forces/torques and center of pressure values based on those conditions.
How can you use the FluidForceSensor?
This sensor opens up exciting new possibilities for aerodynamic design. Here are just a few use cases we’ve envisioned:
-
Auto-trimming systems for aircraft: Use
EvaluateAsync
on an aircraft’s body and control surfaces to find optimal deflection angles for ailerons, elevators, and rudders, improving the stability and performance of your designs in level flight. -
Aerodynamic force visualization: Visualize forces, torques, and the center of pressure in real time by reading the sensor’s properties and applying them to adornments, or by plotting the data for deeper analysis.
-
Wind tunnel simulations: Create wind tunnel-like tools that use
EvaluateAsync
to test assemblies under different conditions, helping you fine-tune aerodynamics directly within Studio.
We can’t wait to see what the community creates with this sensor!
How to get started
Using the FluidForceSensor is simple:
-
Create a
FluidForceSensor
instance under the part you want to measure. -
Either read the sensor’s properties to get the most recent aerodynamic data, or use
EvaluateAsync
to compute values based on your specific conditions.
Example use cases
To help you get started, we’ve included some example use cases in the attached place file.
F15_force_sensor.rbxl (294.4 KB)
One example demonstrates an auto-trimming system for an F-15 aircraft (based on our Studio Beta sample). This system calculates the optimal trim angles for different aerodynamic surfaces. Here’s a snippet of the calcTrim
function used in the sample:
-- Calculate forces and torques for the body and control surface
local bodyF, bodyT, bodyCop =
bodySensor:EvaluateAsync(vel, angVel, cframe)
local surfaceF, surfaceT, surfaceCop =
surfaceSensor:EvaluateAsync(vel, angVel, cframe)
-- Sum up the torque
local totalTorque = bodyT + surfaceT + surfaceArm:Cross(surfaceF * 2)
-- Multiplied by 2 for two surfaces
Another example demonstrates how to create aerodynamic force visualizations by reading the sensor properties and applying them to adornments. Here’s a snippet from the ForceVisualization
script:
rs.Heartbeat:Connect(function(dt: number)
local centerOfPressure = sensor.CenterOfPressure
local normForce = sensor.Force / (20.0 * workspace.Gravity)
local invTrans = part.CFrame:Inverse()
forceAdorn.CFrame = invTrans * CFrame.new(centerOfPressure +
normForce * 0.5, centerOfPressure + normForce)
forceAdorn.Height = normForce.Magnitude
forceAdorn.Transparency = 0
copAdorn.CFrame = invTrans * CFrame.new(centerOfPressure)
end)
Get Started Today!
Download the attached place file to explore these examples and more. We’re excited to see how you’ll use the FluidForceSensor to push the boundaries of what’s possible in aerodynamic design.
As always, we’re eager to hear your feedback, questions, and requests. Please let us know what additional features or sensors you’d find helpful for getting more direct physics data. We look forward to hearing your thoughts and suggestions!
Happy building,
The Physics Team