From ca6aa317ce5ef9e8ad043350b81fd00b5f3cbe4f Mon Sep 17 00:00:00 2001 From: Josh Holtrop Date: Wed, 9 Dec 2009 00:14:17 +0000 Subject: [PATCH] testing gravity in tests/bowling.lua, updated ag.setGravity() documentation git-svn-id: svn://anubis/anaglym/trunk@201 99a6e188-d820-4881-8870-2d33a10e2619 --- doc/index.html | 1 + tests/bowling.lua | 4 ++++ 2 files changed, 5 insertions(+) diff --git a/doc/index.html b/doc/index.html index 9e73382..d5e32ff 100644 --- a/doc/index.html +++ b/doc/index.html @@ -398,6 +398,7 @@ The default up vector is (0, 0, 1).

ag.setGravity(gx, gy, gz)

This function sets the gravity vector to (gx, gy, gz). +The default gravity vector is (0, 0, -9.81).

diff --git a/tests/bowling.lua b/tests/bowling.lua index 246ab77..7cd2726 100644 --- a/tests/bowling.lua +++ b/tests/bowling.lua @@ -53,6 +53,10 @@ function key_down_event(key) elseif (key == "c") then local c = ag.loadModel("crate") c:setPosition(-3, -3, 5) + elseif (key == "g") then + ag.setGravity(0, 0, 2) + elseif (key == "r") then + ag.setGravity(0, 0, -9.81) end end