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 - quixote_arg

Pages: [1]
Support / Object3D IDs and Names
« on: March 27, 2006, 08:05:55 pm »
Hi, I'm doing a simple 3D viewer, based on the FPS demo.

The player can throw a ball, and if the ball hits something relevant in the world, something happens. This is done as an Applet.

The first time everything goes well, but if I reload the page, object ID's and names change, so the code that checks if the ball has hitten something relevant stops working.

So, questions:

a) How to uniquely identify an Object3D?
b) How to dispose things in JPCT so that the next time the applet gets loaded the IDs and names are the same?

Thanks a lot


Support / Texture tiling on plane
« on: February 07, 2006, 09:18:38 pm »

I've created a plane using Primitives class. When I apply a texture, it strechtes it all over it. I would like the texture to be tiled on the object. Is there an easy way to do this? I searched the forum, with no luck...

Here's the code:

Code: [Select]

wall = Primitives.getPlane(15, 20);
wall.setOrigin(new SimpleVector(800, -150, -300));        wall.setCollisionOptimization(Object3D.COLLISION_DETECTION_OPTIMIZED);


Support / Textures in applets
« on: January 23, 2006, 03:12:55 pm »
Hi, I'm trying to make a simple applet based on the FPS code. The world so far consists only of a floor and a wall. I try to apply a brick like texture to the wall but it renders bad.

This is the texture I'm using:

And this is a screenshot of the result:

Here is the code of how the wall is initialized:

Code: [Select]

        wall = Primitives.getBox(150f, 0.01f);
        wall.rotateY((float) Math.PI / 4);
        wall.rotateX((float) Math.PI / 2);
        wall.setOrigin(new SimpleVector(800, -75, -300));

And here is the initialization of the FrameBuffer:

Code: [Select]

        buffer = new FrameBuffer(width, height, FrameBuffer.SAMPLINGMODE_NORMAL);


Any ideas why is this happening?

Thanks a lot

Support / Sphere collision and radius
« on: January 18, 2006, 08:59:22 pm »
Hi, I have a question.

I've created an sphere Object3D with the Primitives class. Something like:

Code: [Select]
Object3D bullet = Primitives.getSphere(0.5f);

When I want to try collision of that object, naturally the checkForCollisionSpherical method seems to be the most appropiate.

However: the checkForCollisionSpherical takes a float as a radius but the getSphere method of the Primitives class takes a float with the scale of the sphere.

How are these two values related with each other?

I mean: what is the radius for a sphere created with Primitives in order to make the collision sphere optimal?


Pages: [1]