surfaceEffector(opt: SurfaceEffectorCompOpt): SurfaceEffectorComp
Applies a force on a colliding object in order to make it move along the collision tangent vector. Good for conveyor belts.
param
opt- Options for the surface effector component. See
loadSprite("belt", "/sprites/jumpy.png") // conveyor belt add([ pos(center()), sprite("belt"), rotate(90), area(), body({ isStatic: true }), surfaceEffector({ speed: 50, }) ])
returns
The surface effector comp.
since
v3001.0