Discussion Board

Results 1 to 3 of 3
  1. #1
    Nokia Developer Champion raj_J2ME's Avatar
    Join Date
    Mar 2008
    Location
    The Capital of INDIA
    Posts
    4,314
    Hey Experts,
    Please tell me how I can check the collision of moving image/circle and rectangle..
    I mean there is a rectangle and 1 image/Circle is keep on moving then I have to check the collision detection..

    Please make this possible as soon as possible,
    Thanks,
    Thanks with Regards,

    R a j - The K e r n e l


    Join Delhi-NCR Nokia Developer's Community,

  2. #2
    Registered User gurusekhar's Avatar
    Join Date
    Apr 2008
    Posts
    10
    Hi
    Get the pixel information of both rectangle and moving image/circle. When moving object falls(or touches) into the pixels of rectangle area,then think the collision is happened.

  3. #3
    Nokia Developer Champion jappit's Avatar
    Join Date
    Nov 2007
    Location
    Rome, Italy
    Posts
    2,391
    Hi Raj,

    for pixel-level collision detection you can use the Sprite collidesWith() methods: by setting its pixelLevel argument to true, the method will check only collision between opaque pixels.

    If you're not using Sprite objects, only available method is to implement the collision detection by your own: checking a circle is not that difficult (you can use its radius and check for objects with a lower distance), but with more complex images/sprites it can easily become difficult.

    Pit

Similar Threads

  1. Smart card detection speed
    By hvuoltee in forum Near Field Communication
    Replies: 1
    Last Post: 2008-10-13, 13:38
  2. Transparant Rectangle, possible ?
    By Tiger79 in forum Mobile Java General
    Replies: 4
    Last Post: 2008-08-22, 15:24
  3. Discrepancy between Carbide.vs SDK detection and "devices" tool.
    By Noki@lex in forum Symbian Tools & SDKs
    Replies: 3
    Last Post: 2008-08-19, 12:01
  4. Help me to draw line and rectangle
    By RB_Sahu in forum Symbian User Interface
    Replies: 6
    Last Post: 2008-03-10, 10:40
  5. MIDP2.0碰撞检测问题
    By hallywang in forum [Archived] Other Programming Discussion 关于其他编程技术的讨论
    Replies: 5
    Last Post: 2006-10-03, 11:12

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Nokia Developer aims to help you create apps and publish them so you can connect with users around the world.

京ICP备05048969号  © Copyright Nokia 2013 All rights reserved