Posted: Tue Nov 01, 2005 11:43 pm
This is normal. Only a body can be extended, but you can add multiple extensions to 1 body and in this way work around it. That is just the way Tokamak is set up.Issues: 1)I can't extend an extended body.
Not clear what you mean, can you send me an example?2) extending from the source Body object (trying to create the walls of the maze) I have buggy behaviour, flashing and crazy forces random applied....
The first one is defining the position of the body and the actor connected to it, while the second one allows to offset the actor (so to de-center it from the body). It's a "dirty" feature, as it creates a discontinuity in the calculated physics. Small changes are mostly OK, but bigger steps can lead to a short instability. To be used with care, but is very efficient in resources and can avoid adding another joint / body!3) I don't understand the differences between the PosX, PosY, PosZ parameters and the following parameter triplet. It seems that the working one for modifying the relative position of the extended body is the second.
This bug was meanwhile resolved4) the rotation parameters are in radiants and not in degrees ( )
This extension was meanwhile added5) A StaticBody can't be jointed.
Not clear what you mean. In your demo, you do use an extendrigidbody to fix the maze-borders to the maze-plane, so what is the problem?actually I don't know how to put the maze over the plane, extendrigidbody is too buggy.
Important to know are:
Any extension can only be added to a body. Why? Because the body is the only thing the physics engine calculates position and rotation for. Extensions are just fixed geometry that is hard-connected to the body and which extends the collision bounding box
Extensions are always expressed in relative coordinates towards the body you connect to (eg pos, offset and rotation)
Offset allows to move the actor-mesh, independent of the bounding box.
So there You can connect the maze-border to the maze-plane by a Extendrigidbody.
- ExtendRigidBody is used to initialy connect additional geometry to a body.Should I try to use SetPositionOfExtended(BodyId, GeomId1, PosX, PosY, PosZ) or SetAngleBetweenExtended(BodyId, GeomId1, GeomId2, AngleX, AngleY, AngleZ)? Whats the difference in respect of ExtendRigidBody? Are this commands useable in "Real Time" in the Start Order, to quickly modify an angle or a Pos?
- SetPositionOfExtended(BodyId, GeomId1, PosX, PosY, PosZ) and SetAngleBetweenExtended(BodyId, GeomId1, GeomId2, AngleX, AngleY, AngleZ) are intended to "on the fly" modify position and angle of an extension that was before defined by ExtendRigidBody.
I'm quite confused by the word "maze". Seems I give it another interpretation then you do?Now a fantascientific question. Is possible to convert bsp model of the level in a physic object. In this case it would be very simple to create the maze (naturally i think no, but just to rule out the doubts...)?
Models are today not supported. My knowhow on genesis is limited and I do not know how to read the model mesh. I need this to create the corresponding Tokamak collision geometry and asked some help a while ago. Till now it's unsolved. This also means that doors and platforms are not seen by the Physics engine. It's an item we need to resolve, but I need some help on genesis
This was meanwhile added6) the CreateBallJoint hasn't rotation setting. To create a flipping maze is better than 2 crossed hinges, but I can't turn it up.
No problem and value it a lot ! Any feedback is welcome.7) Please excuse my tirosomeness...
Tokamak knows 1 triable mesh only. This mesh is to my knowledge not hard restricted in size + does nor require that triangles are connected, so it can support multiple independent shapes in 1 mesh. I see it feasable to enxtend the code to look for staticmesh entities and to read these meshes additional to the standard bsp into the Tokamak mesh. So, yes, should be possible.Convex hull:
So how to have a complex and convex collision shape? Newton uses a system of aggregative hulls (i can't find the link anymore ).
There is a way to link the static mesh per face collision wih tokamak?
The static mesh collision is built on ode? say this because the staticmesh is attachable to pawns and so to bodies....The static mesh uses the genesis collision. The fact you can connect it to a pawn does not means that the PAWN is becomming a rigidbody and that only a collision box is created for the pawn, not for the static mesh.
It's a well known library for collison detection and it is used in the ODE physics engine. I do not know what code is inside Tokamak, maybe it is also opcode? Before I started using Tokamak I've reviewed other physics engines. Tokamak is the easies and less heavy version, still supporting all important features. ODE is slightly slower and the demo's suffer from bugs. Newton is one of the better engines, with good physic properties and supporting many features, but unfortunately it is also slow. In the meantime I also discovered another interesting engine called JigLib. It support most features Tokamak has. After the alpha, I will devope some days to make a code test case using JigLib and see if this performs better then Tokamak. Main advantage: I have the code for JigLib, not for Tokamak.OPCODE
Progress:
- The vehicle entity no longer crashes
- The car is correctly assembled and visible
- The steer hinge-rotation done by rotating the hinge's attachment "on the fly" is working, but shows some instabilities. I will skip the idea and first implement 2 additional hinges + steer control by Torque (as in the script). In a later stage I will try to remove them again and apply a joint-callback on the hinge and force the rotation inside the callback.
- So the focus is back on a VehicleEntity using 6 hinges