×

Discussion Board

Results 1 to 2 of 2
  1. #1
    Registered User
    Join Date
    Jan 2008
    Location
    Brazil
    Posts
    18

    Question M3G how to create collisions?

    I created my .m3g file, set a camera (I use as a character, like a FPS game), the World object and everything else to make the application appear, but I have the following problem, I don'tknow how to implement collisions, I'd like to make my camera collide with the scenary? I heard it has something to do with RayIntersection class and pick() method, I just want to check if the entity is collided, the collision response I can implement by myself, how do I make it?

  2. #2
    Registered User
    Join Date
    Jan 2008
    Location
    Brazil
    Posts
    18

    Re: M3G how to create collisions?

    I did this

    Code:
    Class extends GameCanvas {
       Object3D[] o3d;
       Camera cam;
       World w;
       
       public Class(){
           //load object 3D .m3g
           //create camera
           //put the object 3D and the camera in the same world
       }
       
       run(){
          while(){
              g3d.bindTarget(g);
                cam.translate(0.0f, 0.0f, 1.0f);
                g3d.render(w);
              g3d.releaseTarget();
              
              flushGraphics();
          }
       }
    }
    Does anybody know how to "check" the collision from the camera to the meshes in .m3g file?

Similar Threads

  1. Trusted Application
    By damien_a in forum Mobile Java General
    Replies: 11
    Last Post: 2012-02-17, 20:49
  2. Replies: 10
    Last Post: 2007-07-02, 06:28
  3. Known bugs in the Nokia M3G implementation
    By taarnio in forum Mobile Java Media (Graphics & Sounds)
    Replies: 5
    Last Post: 2005-11-14, 12:51
  4. M3G (JSR 184) Detail about External Reference in m3g file
    By amitian in forum Mobile Java Media (Graphics & Sounds)
    Replies: 1
    Last Post: 2004-12-28, 14:50
  5. Replies: 9
    Last Post: 2004-09-12, 10:08

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
×