I'm curious. Was it an unused feature left unfinished by the programmers or we just used the physics in a different way?
Because its buggy and not useful for anything.
]]>With this we will finally be able to play furniture soccer. What a great day.
New game mode for Flatline, how about that?
]]>Moveable furniture was one of the features mentioned in Oni, however, it was removed before its release. However, we can now implement it to a limited degree, due to Oni's physics engine. We can push things around, but cannot jump on them, you will fall through the object. Sometimes collisions work, other times they don't.
To make it happen, you will need a new file called physics.xml. It will need to look like this:
<?xml version="1.0" encoding="utf-8"?>
<Oni>
<Physics>
<Object Name="object_chair">
<ScriptId>1</ScriptId>
<Geometry>officechair</Geometry>
<Flags>FaceCollision</Flags>
<Physics>Physics4</Physics>
<Position>250 1 -330</Position>
<Rotation>0 0 0</Rotation>
</Object>
</Physics>
</Oni>
Object Name: needs to be unique, ScriptId: unique number, Geometry: OFGA name, Position x,y,z coordinates, Rotation: angle of facing.
In the control file add the link <Import>out/physics.xml</Import> inside the Objects tag and place the physics.xml file in the out folder.
Finally, in the bsl file you need to add the command: obj_create ScriptID, in this example it would be obj_create 1
Then you will have something like this: http://www.youtube.com/watch?v=YICB7qugrtc
Interestingly, if you use the command ob_show_debug=1 in the Dev Console, you will see something like this:
It shows the bounding box and collision sphere. For some unknown reason the collision sphere for the chair is very small.
]]>The BINACJBOFurniture file is used to place objects through the level. The objects are know as OFGA.
<OFGA id="0">
<EnvParticle />
<Elements>
<OFGAElement>
<GunkFlags>NoCharacterCollision NoOcclusion</GunkFlags>
<Geometry>M3GMV_tctf_cruiser_0</Geometry>
</OFGAElement>
<OFGAElement>
<GunkFlags>NoCharacterCollision NoOcclusion</GunkFlags>
<Geometry>M3GMV_tctf_cruiser_6</Geometry>
</OFGAElement>
<OFGAElement>
<GunkFlags>Invisible NoObjectCollision</GunkFlags>
<Geometry>M3GMV_tctf_cruiser_7</Geometry>
</OFGAElement>
</Elements>
</OFGA>
OFGAElement links to the M3GM and the flags for the object. The object can be made up of multiple parts. This tctf cruiser is composed of 8 parts. The last element is basically a box around the entire car.
The objects can be created in a 3D program and exported as an .obj and .mtl files. Then these 3d files are converted to M3GM files with the OniSplit command -create:m3gm
An example will be posted later.
]]>