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

Pages: [1]
1
Support / Multiple rotations on different pivots
« on: June 13, 2013, 12:53:43 pm »
Hello Egon,

Just a little question about multiple rotations with multiple pivots on the same object.

I'm first setting a pivot, do a rotation then I'm changing the pivot and do another rotation but it seems that both rotations uses the last pivot I provided.

Is it intended ? If so, how could I do to resolve this issue ?

Thanks in advance!


2
Support / Rotation on group of objects
« on: June 12, 2013, 05:28:54 pm »
Hello,

I'm currently working on my own animation module for my game. Very simple stuff with only textured rectangles and pivot nodes.
I don't want to use Bones or any other tool, the objective is to make mine ... and to avoid using any 3D modeling tools since I'm totally bad at modeling  ;-)

My problem is about rotations. If I have a character with head, torso, legs, arms, ... and I need to perform a rotation on the whole character I have no idea how to do it (without using setChild()).
I have a "main" object, the head in this case and this one turns perfectly with something like that :

Code: [Select]
Matrix mat = new Matrix( target.calcSub( head.gettranslatedCenter()).normalize()).getRotationMatrix() );
head.setRotationMatrix(mat);

But my problem are the other Object3D of the model, if I apply the same they just turn to the correct direction on their center axis but without moving of course.
I was thinking about a rotation on the Y axis, but no idea how to compute the angle they should turn.

Thanks in advance !




3
Support / Shader based on distance from lightsources
« on: January 08, 2013, 11:11:27 am »
Hello,

Currently my game don't have any lightning (except the ambiant one) and I would like to add some.
Problem is that it's block-based, not a single loaded object, and due to the vertex based lightning, it looks horrible when I try.

I tried to use shaders but being totally new with them it's a bit difficult to get something nice ;-)

What I need is shaders that works on multiple light sources (maybe even colored but that's not mandatory) and based on distance but not on normals ... and that don't go trough walls if possible.

Does someone have a shader that could fit that need ?

Thanks in advance !

4
Support / Camera and texture problem
« on: December 12, 2012, 03:52:43 pm »
Hello there,

I'm currenly porting one of my old games in 3D and I'm reaching a small problem with cameras and textures.
It's a 3rd person game so the camera follows the hero.

I put a simple mechanism using checkCollisionElipsoid with a rotation on X axis to look a bit up/down :
Code: [Select]
                    // perso.sprite.getMain() returns the head which is the parent object of the character

                    cam.setPositionToCenter(perso.sprite.getMain());
            cam.align(perso.sprite.getMain());           
            cam.rotateX(totalRotationX);

           
            world.checkCameraCollisionEllipsoid(Camera.CAMERA_MOVEOUT, ellipsoidCam, 10, 8);
            world.checkCameraCollisionEllipsoid(Camera.CAMERA_MOVEUP, ellipsoidCam, 1, 5);

It's working fine for outdoor levels but while rendering an indoor level, I have a lot of time the camera going "out of the wall" and I can see behind the texture like in the second screenshot.
The first screen shot is when the camera is normal, the second is when the character is close to a wall and I rotate the camera to the right.

Is there a way to avoid that ?

Thanks in advance !





Pages: [1]