In: General14 Apr 2009
There have been a few edits and additions made to the library lately:
Radians vs Degrees
One major change is how rotation is handled. We made a few changes to the RigidBody class and the JConfig class. You as a developer now have the option to use either degrees or radians to set and get RigidBody rotations. All you have to do is specify which type you want to use by setting the JConfig.rotationType to either DEGREES or RADIANS. At the moment the JConfig.rotationType value is defaulted to DEGREES
The engine level calculations are still done with radians though (may or may not change, TBD), never the less the conversion to radians and degrees and vice versa is done at the RigidBody level. Additionally, we have added “yaw”, “pitch” and “roll” properties to the RigidBody class which also use either radians or degrees based on the JConfig.rotationType value.
New class: MouseConstraint
There has been a new class to the Papervision3D plug-in called MouseConstraint and a new example to the Papervision3D examples folder. The class basically allows you to attach a world constraint to an object and simulate dragging.
You can now also access the the PhysicsSystem directly from your instance of the plugin by accessing the “engine’ property.
What used to be:
can now be accessed as
considering that you names your instance of the plugin “physics”.
You can now also add constraints directly from your plugin instance as so:
where as before you had to get an instance of the PhysicsSystem and add it to that.
JiglibFlash is a open source Actionscript 3D Physics Engine.