Allows you to launch an object from a position with speed.
Appearance in Composition Pane
Description
Launch from object
sets projectile’s position and rotation to match origin’s position and rotation. Then, its speed is set to the number parameter, in meters per second. This can be set to negative to fire in the opposite direction. Make sure your origin object is non-collidable, you may also consider using a trigger gizmo for this. If the object is collidable your projectile may collide and not launch correctly.
Parameters
object, object, number
Launch a physics object from the origin at a speed.
When a player is holding the object the script is attached to and presses their index trigger. The projectile will orient to the origin object’s position and rotation, and then launch from there along the origin’s z-axis at the speed in meters per second.