testing gravity in tests/bowling.lua, updated ag.setGravity() documentation
git-svn-id: svn://anubis/anaglym/trunk@201 99a6e188-d820-4881-8870-2d33a10e2619
This commit is contained in:
parent
ea4346a55e
commit
ca6aa317ce
@ -398,6 +398,7 @@ The default up vector is (0, 0, 1).
|
||||
<p><tt>ag.setGravity(gx, gy, gz)</tt></p>
|
||||
<p>
|
||||
This function sets the gravity vector to (gx, gy, gz).
|
||||
The default gravity vector is (0, 0, -9.81).
|
||||
</p>
|
||||
|
||||
<a name="ag_startFrame" />
|
||||
|
@ -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
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user