Set Velocity: Difference between revisions
-u ndefined- (talk | contribs) m (Use infobox) |
-u ndefined- (talk | contribs) (Use Image template, remove excess details and explain example) |
||
Line 10: | Line 10: | ||
}} | }} | ||
Instantaneously sets a physical object's directional | Instantaneously sets a physical object's directional (units/second) and angular velocity (degrees/second). | ||
== Notes == | == Notes == | ||
Line 25: | Line 19: | ||
== Example == | == Example == | ||
Add a "speed limit" to a physical object: | Add a "speed limit" to a physical object. | ||
By checking whenever the [[distance]] of an object's velocity exceeds a set limit, we can [[normalize]] and [[scale]] to it: | |||
{{Image|Set_Velocity_example.png}} | |||
== Related == | == Related == |
Latest revision as of 07:48, 26 May 2024
Set Velocity
Type | Script block |
Collider | None |
Folder | Physics |
Ports | |
---|---|
Inputs | Before Object Velocity Spin |
Outputs | After |
Instantaneously sets a physical object's directional (units/second) and angular velocity (degrees/second).
Notes
This should be used sparingly. No real object can instantaneously change its velocity, and simulated objects may behave weirdly when forced to do so.
Example
Add a "speed limit" to a physical object. By checking whenever the distance of an object's velocity exceeds a set limit, we can normalize and scale to it:
