We are trying to adjust volume to same volume level by using gain property on different tracks.
What is gain property on track? Max and min value? Is it possible/Is it good approach to adjust volume depends on gain property?
It is a good idea to use the property gain, it defines the signal strength.
The default value is 0, you can have lower and greater values that you will have to adjust around but I'm not sure that the method setVolume of the SDK will work fine with this value.
Related
Can you change the size of pixels in Density Map?
I suspect that the size of density map pixels is based on agent/pedestrian size. Can it be modified, so that pixels are smaller and leave more precise trace?
Currently, my density map leaves huge pixels that are very difficult to use as reliable information.
EDIT: Screenshot below,
Thanks,
Peter
I am pretty sure it's not possible, the density map has a resolution of 1 meter (whatever the equivalent to 1 meter is by your scale object) and there's no way to change it (as far as I know)
But, what you have to make up for this, is the canvas object that you can find in the presentation palette. With the canvas object you can define your own resolution but you also have to code your own density map using your own personalized rules. Check the help documentation to understand how to use this and check the wondering elephants model to understand how to make changes dynamically.
Is it possible for the Unity TerrainData structure to take absolute elevations? I have a terrain generator that generates absolute elevations, but they are huge. The perlin octave with the highest amplitude is the one that decides what altitude the entire map is at, with an amplitude of 2500 and wavelength 10000. In order for my map to tile properly and transition between altitudes seamlessly, I need to be able to use this system of absolute altitude. I would scale down my generator's output to fit in the limited space (between 0 and 1), and stretch the y scale of the TerrainData, but it will lose too much precision.
What can I do? Is there a way I can use elevations that may vary by as much as 2500 meters?
One thing that might be important is that there will never be that much variation in the space of a single Terrain object, but across many, many Terrain objects, it is possible for the player to traverse that kind of altitude.
I've tested changing different variables, and I've reached the following conclusion...
Heightmap Resolution does not mean precision of data (some people I asked believed it determined the number of possible height values). It means the number of samples per row and column. This, along with size determines how far apart samples are, and effectively how large the polygons of the terrain are. It's my impression that there is no way to improve precision, although I now know how to increase the height of the terrain object. Instead, since I will never have 2500 meters of elevation difference in the same terrain object, each piece of terrain generated by my generator I will put in a terrain object that is positioned and sized to contain all of the data in that square. The data will also have to be converted so that it will fit, but other than that, I see no drawbacks to this method.
Important note: Resolution must be 2^n + 1 where n is any number. If you provide a different value for resolution, the next permitted value down will be selected (always the one below your choice).
I have an app where I want to place an object within a photo and scale it to reflect the distance it should be from the camera. At full size I want it to reflect approximately 10 meters away from the camera and at its smallest size I want it to be about 30 meters away.
Unfortunately, the slider seems to scale it almost infinitely, without looking very realistic in scaling. What's the best way to accomplish this such that I get both minimum and maximum distances as well as making intermediate distances scale in a realistic fashion (i.e., each intermediate step reflecting the actual distance it should be from the camera)?
By default UISlider's minimumValue and maximumValue are 0 and 1, respectively, which might explain the scaling behavior you're seeing. You can configure these values to simplify your calculations or, alternatively, scale the default 0-1 range to 10-30 meters.
Sorry for being a noob here. I am not able to clearly differentiate between CLLocationManager's properties distanceFilter and desiredAccuracy.
If I want my application to give different coordinates for even small distances (say 100-200 metres) what values should i set for these properties.
Help would be greatly appreciated.
According to developer.apple.com
distanceFilter
The minimum distance (measured in meters) a device must move laterally
before an update event is generated.
That means, based on previous location event, another location update will only be received after exceeding distanceFilter value distance.
desiredAccuracy refers to how accurate your location data should be.
For example if you wish to see the exact street you're on you a high accuracy value for this parameter. (kCLLocationAccuracyBest)
If you only wish to see the approximate area (such as in which neighbourhood you're in) you'd set a lower accuracy value for this param. (kCLLocationAccuracyThreeKilometers)
Choose this to suit your needs, however be aware that the more precise you wish to be and the more often you request updates, the more power it will drain from your device.
Hope this helps,
Vlad
distanceFilter - this is minimal distance which device should pass from previous location which was passed to delegate with ...didUpdateToLocation:... method. And as soon as distance reached location service will invoke ...didUpdateToLocation... again and so on.
desiredAccuracy - tells to location service how accurate coordinate you want and this is minimal location error radius. If value is very low (ex. 5) radio will try to use GPS hardware and will keep powering it up hardly to make it give most accurate location. If value is large,than system may decide to use data which was retrieved from WiFi hotspots location triangulation.
how to detect that object in the space is currently stable or not and his position also.
which parameter gives us info about that or is there any function?
If its position is constant through time, then it's stable. If not - it's not stable.
Just check for body's velocity and, eventually, acceleration. If you want to be super accurate in checking if your body is static use:
if cpveql(body->v,cpvzero)
theyAreQualDoSomethingFunction();
However, as the documentation warns
Be careful when comparing floating
point numbers!
So you might be better of checking if the absolute values of body->v.x and body->v.y are smaller than some small precision value.
As mentioned earlier, to be super precise you should also check acceleration.