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.


Messages - hytparadisee

Pages: 1 [2] 3 4 ... 6
16
Support / Re: World.checkCameraCollisionSpherical()
« on: June 29, 2007, 01:33:38 pm »
ROFL raft, no wonder it took you soooo long to post - you are searching your source!

avatar.setVisible(false);
...
avatar.setVisible(true);

r a f t
That's tricky ;)

17
Support / Re: World.checkCameraCollisionSpherical()
« on: June 29, 2007, 08:57:34 am »
Alright people, I still couldn't solve the problem. As I will be busy these days, i have to put it aside for a while. But i do come up with a workaround to cover up the problem (somehow, with my fuzzy head 8)). Actually sliding occurs even if the recursion is 1, but the strength is very weak (i.e. after a few units of sliding, the cam will bump out of walls). But I cannot make it too high because my camera will keep shaking when the cam gets nearer to the char. I might be wrong because my code actually comes from the car example, whereby some camera smoothing is applied. Alas, i think the problem only comes when the camera slided to a point where it gets too near to the character, so I added a threshold of my own ==> if the actual distance between cam and char after collision is less than the threshold, the camera will stop moving, so i can prevent my camera from both jumping out of my wall, and from shaking when getting too near. It works without problems, but the outcome and the effect is quite different from that in karga LOL. I will accept my way as a workaround atm, until I have more time.

But to be honest - If you have never tried the collision system in jME, you will never realize how easy you can implement collision in jPCT. Hence appreciate whatever you do in jPCT.

18
Support / Re: World.checkCameraCollisionSpherical()
« on: June 29, 2007, 08:06:45 am »
Ya that's exactly what I did, any problem with the code below ???

Code: [Select]
            SimpleVector camPos = new SimpleVector(getSpecialObject().getTransformedCenter());
            SimpleVector zOffset = getSpecialObject().getZAxis();
            SimpleVector yOffset = new SimpleVector(0, -dy, 0);
            zOffset.scalarMul(-dz);
           
            camPos.add(zOffset);
            camPos.add(yOffset);
           
            cam.setPosition(camPos);
           
            if (left) {
                world.checkCameraCollisionEllipsoid(Camera.CAMERA_MOVELEFT,
                        Util.CAM_ELLIPSOID_DIMENSION, 4, 1);
            }
            if (right) {
                world.checkCameraCollisionEllipsoid(Camera.CAMERA_MOVERIGHT,
                        Util.CAM_ELLIPSOID_DIMENSION, 4, 1);
            }

19
Support / Re: Skeletal API
« on: June 29, 2007, 07:30:21 am »
LOL, take your time mister :D. Everyone is absolutely patient.

20
Support / Re: World.checkCameraCollisionSpherical()
« on: June 28, 2007, 09:52:23 am »
I think in karga this one was solved pretty well, it tries to move the cam closer to the avatar and at the same time lift the camera a bit up. Is that a home-brew solution?

21
Support / Re: World.checkCameraCollisionSpherical()
« on: June 28, 2007, 06:23:48 am »
Nope, it didn't work. But I think it's my problem understanding the issue (Mathematically 8)).

Take a look at this graph:


When the cam is orbiting and finally meet a wall, it will slide towards the target. This one is already working. But the problem is when the cam continue sliding (until it gets very close to the char), it suddenly goes to the location where my red arrow is pointing to (i.e. return to the original orbiting track).

Actually the problem is not with the collision algorithm, but with the parameters. Firstly, in this case you cannot simple use a camera constant to define the direction because the direction is always not around an axis. Secondly, I dunno how to determine the speed in this case.

22
News / Re: Currently working on...
« on: June 28, 2007, 05:32:50 am »
That's s/w rendered right? If yes, it looks really good.

23
Support / Re: Need Another Help
« on: June 27, 2007, 05:36:23 pm »
Alright, solved, the board is simply not thick enough lol.


24
Support / Need Another Help
« on: June 27, 2007, 02:52:27 pm »
I loaded my scene model from a 3DS file. For the sake of some special processing, i have to break a box such that its one side is detached but their geometric information intact. In other words, the box will turn into a mesh and a plane, for which, i will do the special processing.

The problem is when the plane is far away from the camera, it flickers terribly. I can guarantee that this problem only occurs if I break a plane from a box. I am not sure whether this problem exists if manually creating a plane though. Without further ado, i will give you the shots.

When the cam is near the plane, it is displayed correctly.


However, if the cam is far from the gradient plane, it is shown like this

25
Feedback / 3DS object naming convention
« on: June 27, 2007, 01:59:01 pm »
Every time i export my object/save my scene to .max or .3ds, if the name of the object is longer than 8 characters, it will be truncated. Anyone knows whether this limitation is reinforced by the tool (i.e. 3d max) or by the document standard?

26
Support / Re: World.checkCameraCollisionSpherical()
« on: June 27, 2007, 12:50:25 pm »
Just did the test, but the problem is that the checkCameraCollisionEllipsoid that accepts a SimpleVector as direction doesn't slide my camera. But i will stick to the SimpleVector version atm cos my camera won't go off.

27
Support / Re: World.checkCameraCollisionSpherical()
« on: June 27, 2007, 12:48:45 pm »
Alright, i still haven't solved the problem though, but i think i got some more understanding about the issue. My camera is not first person!!! :o. It is an orbiting camera, so when the camera orbits the object, the velocity is not around a simple axis. Then does it mean that i should use this version:

public boolean checkCameraCollisionEllipsoid(SimpleVector direction, SimpleVector ellipsoid, float moveSpeed, int recursionDepth)

Unfortunately im not specialized in maths stuff. How do I get the correct "direction" parameter, would it be camPos.calcSub(oldCamPos); ???

28
Support / Re: World.checkCameraCollisionSpherical()
« on: June 27, 2007, 03:52:00 am »
Actually the problem is clear, because I couldn't find an ellipsoid version where the camera can slide. I will try to increase the radius first and see if it helps.

29
Support / World.checkCameraCollisionSpherical()
« on: June 26, 2007, 02:50:14 pm »
Generally this method works without problem. But sometimes if my camera moves too fast, it will still bump out of walls/ceilings.

I'm sure this can be solved by changing some of the values in the parameters, so what to adjust?

FYI: Im using this version:

public boolean checkCameraCollisionSpherical(int mode, float radius, float moveSpeed, boolean slideMode)

30
Support / Re: Reflection efect
« on: June 23, 2007, 04:49:34 am »
Just a bit worried -> ??? Would that affect any other aspects of jpct (especially performance-wise)?

Pages: 1 [2] 3 4 ... 6