- Joined
- Jun 4, 2009
- Messages
- 91
Here is a little physique engine for WC3 wrote in vjass.
It include a little escape demo wich you play with arrow keys
It does a computation of dynamics with some parameters you can specify like
-gravity
-air density (used in air friction, but I didn't really tested it)
-refresh period
this works by a structure that you can extends as shown in the "How To Use" trigger and the escape demo
While updating it does call two stub functions.
-in the first, you may return the sum of your forces
(weight and ground reflection will be computed by the engine then, so don't compute them yourself)
you can also add misc stuff
-the second is called once the destination is computed, but the units isn't yet moved, so you can perform collision detection (not yet provided in, sorry)
move the camera, and so on
Hope it'll help you making good maps. Please report me bugs and/or code correction if you do. Also report me if I did a mistake in the code.
It include a little escape demo wich you play with arrow keys
It does a computation of dynamics with some parameters you can specify like
-gravity
-air density (used in air friction, but I didn't really tested it)
-refresh period
this works by a structure that you can extends as shown in the "How To Use" trigger and the escape demo
While updating it does call two stub functions.
-in the first, you may return the sum of your forces
(weight and ground reflection will be computed by the engine then, so don't compute them yourself)
you can also add misc stuff
-the second is called once the destination is computed, but the units isn't yet moved, so you can perform collision detection (not yet provided in, sorry)
move the camera, and so on
Hope it'll help you making good maps. Please report me bugs and/or code correction if you do. Also report me if I did a mistake in the code.
Last edited: