Dynamic forces influence NURBS and polygonal objects in the world space coordinate system. Regardless of how you rotate a cone, for instance, a gravity field with default option settings moves the cone down along the world space Y-axis.
By default, fields also influence particle objects in world space. However, you can cause a field to affect a particle object in the particle object’s local space. For example, you can make a gravity field pull a particle object down the particle object’s local Y-axis rather than down the world space Y-axis.
See nParticle Dynamic Properties.
A particle object’s position, velocity, and centroid attributes contain local space values. (The centroid of a particle object is the average position of its particles.) There are times when you need to know world space values for a particle object.
For example, suppose you apply gravity to a particle object to make it fall through a glass floor. You also key the particle object’s Rotate Y attribute to make it rotate around the origin’s Y axis as it falls. Suppose you need to know the exact world space position of the particles so you can change their color when they pass through the floor. You cannot get this information with the position attribute, because it contains the local space position.
You can get this information from the three world space counterpart attributes for position, velocity, and centroid:
The centroid attribute is a compound attribute consisting of centroidX, centroidY, and centroidZ attributes. The worldCentroid attribute is a compound attribute consisting of worldCentroidX, worldCentroidY, and worldCentroidZ attributes.
You can read the value of worldPosition, worldVelocity, and worldCentroid as inputs in the Connection Editor. You can read the value of worldCentroidX, worldCentroidY, and worldCentroidZ in expressions. You cannot set the values of any of these attributes.
The worldVelocity contains the difference between the worldPosition in the current and prior frame. The worldVelocity is influenced by the object’s (and object parent’s) Translate, Rotate, and Scale values, so it includes the effect of keys you apply to them.
If you need to convert a particle object’s world space velocity to local space velocity, be aware that you can use the worldVelocityInObjectSpace attribute of a particle object.
There is no worldAcceleration attribute.
Each field or spring connected to a particle object writes its vector force value to the Input Force[ ] attribute in the object. This attribute is an array of vectors. There is one Input Force array for each field connected to an object. For example, an object connected to three fields has Input Force[0], Input Force[1], and Input Force[2]. Each vector in the array represents the force on a single particle.
You can use the Connection Editor or API to feed one particle shape attribute into another’s Input Force[ ] attribute. The attribute must be a vector array, for example, velocity.
When you connect an attribute to Input Force[0], if the two particle objects have the same number of particles, the values input to Input Force[0] match one for one. If the object containing Input Force[0] has less particles than the object providing input, the remaining values are ignored. If it has more, the last one is repeated.
Input Force[ ] also exists in the shape nodes of rigid bodies. It works on CVs or vertices the same as for particles.