Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Topics - Ulrick

Pages: [1]
Support / Get a pixel color from and object 3d texture?
« on: November 11, 2010, 05:28:01 pm »
Hi Egon,

I cannot find information regarding this matter on the forum, so I write this.

Is there a way to get a pixel color from an Object3D? It would be nice to have it when colliding two object, get the color of the collision point and/or some points with a coordinate system.

Thanks in advance,


Support / MD2 animation
« on: October 28, 2010, 05:42:53 pm »
Hi all,

as I can read from the documentation, the animation method of an Object 3d, should be used as follow:

public void animate(float index)

    Calculates a new mesh for this object based on the keyframes of its animation sequence and "index". index is a value between 0 and 1 where 0 is the first keyframe and 1 the last. Because no sub-sequence is indicated, the complete animation will be used.

        index - the "time-index" into the animation

So 0 is the first keyframe and 1 is the lastone.

In my case, it seems not to work correctly. 0 seems to be ok, but as for the last keyframe, seems like 1 is not correct as my animation seems actually to freeze for a while and then restart. If I lower the limit value to something around 0.32 o 0.34 it seems to work correctly (not really but it is better).

Can anyone give me some hints on how to use it?

Thanks a lot,


Support / Info on calcAngle on SimpleVector
« on: October 21, 2010, 06:13:54 pm »
Hi all,

just a quick question.

Probably in known to everyone, but I cannot understand why calcAngle return a 180 degree angle (I mean values from 0 to 180).

It could be possible to have it 360 degrees (means from 0 to 360)? or from -180 to +180?  Otherwise, how can I calculate angles from 0 to 360 between two SimpleVectors?

Probably I missed something.

Thanks in advance,


Bugs / Bug? getPolygonIDs problem.
« on: September 27, 2010, 04:06:51 pm »
Hi, I'm trying to develop a simple application for testing purpose, and I found a strange behavour of the getPolygonIDs function.

It actually work perfectly on my desktop environment (win XP), but the same code seem to not work on Android (Nexus One).

All other functionality seems to work, but this one do not work. Could be a bug? My mistake? I'm actually doing the same thing found if the sample code as shown below:

   public void collision(CollisionEvent e) {
       * Make sure that something collided with the ground and that this
       * was an actual entity (and not the camera or whatever).
      if (e.getType()==CollisionEvent.TYPE_TARGET && e.getSource()!=null) {
         Object obj=e.getSource();
          * Make sure, that the source of the collision was really
          * a bullet.
         if (obj instanceof Bullet) {
            Bullet bullet=(Bullet) obj;
            Object3D ground=e.getObject();

             * Here, we have to calculate the position and orientation of the decal the
             * bullet leaves at the ground. This requires a call to calcMinDistance() and
             * to make sure that we are not triggering the CollisionListener again in that case,
             * we temporally disable collision events on the ground.
            SimpleVector za=bullet.getZAxis();
            SimpleVector tc=bullet.getTransformedCenter();
            float d=ground.calcMinDistance(tc, za, bullet.getSpeed()*10);
            if (d!=Object3D.COLLISION_NONE) {
               int[] ids=e.getPolygonIDs();
               if (ids!=null&&ids.length>0) {
                  int id=ids[0];
                  SimpleVector n=e.getObject().getPolygonManager().getTransformedNormal(id);
                  bulMan.createDecal(tc, n);
             * And on again...

This is the code of the car demo (in the bulletTerrainListener file) and the function is used to place a decal when a shot hit the ground.

I don't undestand why on Android the function do not work and the issue is due to a null value of the function getPolygonIDs().


Pages: [1]