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

Pages: [1]
1
Support / Re: Need to collide two md2 (animated character)
« on: January 20, 2013, 02:59:42 pm »
Thanks Egon. You gave the simplest solution.
Different body parts aren't needed.
Different states for punching, ducking etc. will do.

2
Support / Re: Need to collide two md2 (animated character)
« on: January 15, 2013, 12:16:59 pm »
Hi

I was doing the same thing.
I liked the IDEA ONE but i have a few doubts
 The code I use to calculate distance is
Code: [Select]
           if(pcBot.calcMinDistance(pcBot.getTransformedCenter(), myBot.getTransformedCenter(), 8)!=Object3D.COLLISION_NONE){
           Log.e("Collision detected","i have hit the pc bot");
        soundPool.play(punchId, 1, 1, 0, 0, 1);
        soundPool.play(moanId, 1, 1, 0, 0, 1);
           }
(Not correct  ;) as the distance between head and punch is to be calculated not between their centers. And the punch is moving).

I would like to check if there is any object within the 5*5*5 ellipsoid/sphere etc.
Is there any way to do that.????

Also if I continue use
Code: [Select]
public float calcMinDistance(SimpleVector org,
                             SimpleVector dr,
                             float ignoreIfLarger)

What parameters should be used for "org" and "dr" ? org should be pcBot's head and dr should be myBot's fist(How to find them??) pcBot's head can be approximated but how the fist? As its moving .

Thanks in advance.

 

3
Support / Re: Object not turning sideways with Camera
« on: January 10, 2013, 11:18:16 am »
Thanks Egon for being there.

I followed your instructions. Works perfectly now. 8)

One more line in the onSurfaceChanged method was also needed.

Code: [Select]
gun.setRotationPivot(cam.getYAxis());
Thanks

4
Support / Object not turning sideways with Camera
« on: January 09, 2013, 08:43:26 pm »
Hi Everyone

First let me introduce myself. I am Mohit. I have been playing with JPCT for about 10 days now.
Thank you Egon for creating it. It makes things so much easier.

I was trying to make an FPS with gun demo.
The weapon moves up and down as well as forward and backward BUT does not turn left and right with the camera.

Also if I set orientation landscape in manifest. The overlays' position are not as expected. But if i dont use it in the manifest and rotate the device in landscape mode, the position of overlays is fine.

I have attached the source code. I will be very thankful if someone can help me.

Let me know if I can provide any other details.

[attachment deleted by admin]

Pages: [1]