anyone know where to find more info about this maby even a tutorial?, Not interested in trees reacting to wind more a player object ( or a Physics Actor in this case right?)
trying to make a boat that is affected by wind if someone would be so kind to point me in a direction ?
world Wind ( random wind direction emitter for sandbox)
2 speed reduced and increased depending on what angle Physics Actor have.
Depends how realistic you want it to be. If it’s something like Sid Meier’s Pirates. Then this is a simple model:
For the wind I would start with some constant direction and amplitude first. Later you could generate multiple wind directions and amplitudes and then interpolate between them over time.
For simple sail interaction you just need to calculate dot product between sail normal (or sail direction) and wind direction. Look for dot product operator in blueprint. Make sure that your normal (direction) and wind direction are normalized vectors. Just in case you don’t know what it is: Vector Calculus: Understanding the Dot Product – BetterExplained
When you have a dot product (which is a scalar value between -1 and 1) you know the “ratio of angle” between your sail and wind. You can take absolute value of it (if you sail is symmetrical) and multiple it by the magnitude of wind. For simplicity this can be treated as “sail force”. “Sail force” can be treated as proportional to velocity of your boat and just assign it to boat using “SetActorVelocity”.