NewVector
Name
Type
Description
Type
Description
-- entity.lua
local function init(self)
self.Physics = true
local sphere = api.physics.NewSphereShape(1)
self.Body = api.physics.NewBody(sphere, 10)
local force = api.physics.NewVector(1,2,3)
self.Body:ApplyForce(force)
end
-- Turn on physics calculations for this entity.
-- Create a new sphere-shaped physical body for the entity.
-- Apply a force vector to move the entity physically in the direction (1,2,3).
-- The entity will move relative to its current position.Last updated