Set Velocity: Difference between revisions

From Fancade Wiki
(Created page with "/uploads/Set Velocity.png Instantaneously sets a physical object's directional velocity (units/second) and angular velocity (degrees/second). Inputs: * Object: The object to be modified. * Velocity: the velocity to be set with. * Spin: the angular velocity to be set with. == 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. =...")
 
m (Use infobox)
Line 1: Line 1:
[[width=336px,alt=Set Velocity|/uploads/Set Velocity.png]]
{{Block
|image=Set_Velocity.png
|type=s
|folder=Physics
|input1={{Port|e|Before}}
|input2={{Port|o|Object}}
|input3={{Port|v|Velocity}}
|input4={{Port|v|Spin}}
|output1={{Port|e|After}}
}}


Instantaneously sets a physical object's directional velocity (units/second) and angular velocity (degrees/second).
Instantaneously sets a physical object's directional velocity (units/second) and angular velocity (degrees/second).
Line 11: Line 20:
== Notes ==
== 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.
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 ==
== Example ==
Line 17: Line 27:
Add a "speed limit" to a physical object:
Add a "speed limit" to a physical object:


[[File:com.martinmagni.fancade_Screenshot_2021.04.11_20.33.36.png]]
[[File:Set_Velocity_example.png]]


== Related ==
== Related ==
Line 23: Line 33:
* [[Get Velocity]]
* [[Get Velocity]]
* [[Add Force]]
* [[Add Force]]


[[Category:Blocks]]
[[Category:Blocks]]

Revision as of 13:02, 20 May 2024

Set Velocity
Set_Velocity.png
TypeScript block
ColliderNone
FolderPhysics
Ports
Inputs Before
Object
Velocity
Spin
Outputs After

Instantaneously sets a physical object's directional velocity (units/second) and angular velocity (degrees/second).

Inputs:

  • Object: The object to be modified.
  • Velocity: the velocity to be set with.
  • Spin: the angular velocity to be set with.

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:

Related