Scaling a ModelInstance in libgdx 3D and Bullet engine -


Every time I try to add models of one model model (made in 3ds max) to the bullet world, I With the same model, no modified scale This is my current code:

  objeto objmat = mapaactu.nameAndPutObjetos (obj.getMaterias (). Get (0) .nombreasoci, (en) obj .getMaterias () get (0) .cantidad). World.addConstructor (objmat.nombreinterno, objmat.constructor); Vector 3 ozamatong = new vector 3 (obj.entidadbody.getWorldTransform (). GetTranslation (vector 3.zero)); Vector3 scala = new vector3 (obj.getMaterias (). Get (0) .Contidad / 100F, Ozjet.Matius (.) Get (0) .Cantidad / 100F, Ozjet.Matius (.) Get (0) .Kantidad / 100f); Quaternion rotation = new quaternion (); Objmat.instancia.transform.getRotation (rotacion); Objmat.instancia.transform.set (objmatpos, rotacion, scala); Objmat.setEntidad (world.add (objmat.nombreinterno, objmat.instancia.transform));   

However, the status component of the change I get is always correct (this is where "obj" is)! I have debuged it and what should I do to fix a model before adding it to the "Scala" = (0.5 F, 0.5F, 0.5F) bullet world?

Although it depends on body type, general scaling and physics should be avoided. Generally, the scale of the body changes in its volume and affects its physical properties for it. So the correct answer is to keep scaling in your modeling application "bake" (depends on the application that can be called "freeze conversion" or similar) or btCollisionShape Multiplying half extents with scaling when creating btBoxShape .

It is being said that it is possible to scale the collision size, for example btCompoundShape < / Code> to get the shape of your child's figures To apply it, there is a method called setLocalScaling . See also:

Note that if you create a static shape from a model () of the underlying method Scale components will be ignored.

Also note that the scaling component in the matrix used by state speed is ignored. Also see:

Comments

Popular posts from this blog

c - Mpirun hangs when mpi send and recieve is put in a loop -

python - Apply coupon to a customer's subscription based on non-stripe related actions on the site -

java - Unable to get JDBC connection in Spring application to MySQL -