Aego Русский

Scripting

Scripts move bodies through the Rigid Body 2D component and ask the world what is where through aego/physics.

body := node.Get<Body2D>()
v := body.Velocity
body.SetVelocity(Vec2{x * Speed, v.Y})
body.ApplyImpulse(JumpImpulse)
On this page

Moving a body

Every method is listed on the Rigid Body 2D page.

Queries

Raycasts, line casts and overlap tests ignore the caller's own body and skip triggers. They work only during Play. Functions that fill an out slice write at most len(out) entries, so size the slice once with append and reuse it.

Every function is listed on the aego/physics page.