Main Menu
Menu

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.

Show posts Menu

Topics - Veko

#1
Support / collision detection
January 27, 2009, 02:47:06 PM
Got a new problem :D.

If I understand checkForCollisionSpherical correct; when there is collision, checkForCollisionSpherical returns a vector different from the translation vector you entered with the check (the correct new translation)

I tried to apply this to my code :

m_ClientObjects is a Vector<Object3D>

all the Object3D in the vector have   
object.setCollisionMode(Object3D.COLLISION_CHECK_OTHERS);

the object where I'm testing the collision for has
object.setCollisionMode(Object3D.COLLISION_CHECK_OTHERS | Object3D.COLLISION_CHECK_SELF);

  for (int i=0;i<STATE.m_ClientObjects.size();++i)
            {
                SimpleVector temp= STATE.m_ClientObjects.elementAt(i).checkForCollisionSpherical(a, 128);

                if (temp != a)
                {
                    a = temp;
                    System.out.println("New translation: " + temp);
                }
            }


But this snippet of code doesn't work, the SimpleVectors a and temp are always the same... so there is always collision ?? (eventhough there isn't)

What am I doing wrong ?
#2
Support / deleting light ?
January 25, 2009, 03:22:35 PM
Hi, I've got an Entity where I create a new Light along with some other stuff
This Entity has a limited life, so when the Entity reaches his max lifetime the Entity gets deleted (along with all the crap in it)

I haven't found a way to delete a light source from the world.
I know you can disable a light, but that doesn't work seeing I would receive a null pointer to the Entity's Light the next tick

I've been trying to find the Lights Object id so I could use the removeObject function, but lights don't seem to have that function ?

Can it be done with world.removeObject(...), or is there another way I'm missing to remove a Light.

greetz,
Veko
#3
Support / problems with gears example
December 16, 2008, 08:10:38 PM
When I try to make the gears application I keep getting

Loading file E:/SCHOOL/Java/JCPT_test/res/RedGear.3ds
[ Tue Dec 16 20:09:38 CET 2008 ] - ERROR: Couldn't read file E:/SCHOOL/Java/JCPT_test/res/RedGear.3ds
[ Tue Dec 16 20:09:38 CET 2008 ] - ERROR: Not a valid 3DS file!
Unknown file format: E:/SCHOOL/Java/JCPT_test/res/RedGear.3ds


I'm using the 3ds files that come with the example and I've just copied the original code from the example into a new application.