Physics Engine: How to handle object collisions / best practices?

Right now I'm trying to find out by examining all methods and comparing to other engines like box2D how to get information about colliding objects.
I thought I could use i.E. the "checkCollideWith" method of the btRigidBody instance, but it always returns true.
Then, there are several interesting methods in the collisionDispatcher class, but also they don't yield any satisfying results.
I could set a "nearCallbackFunction", but then, the collision wasn't handeled internally anymore.
Has anyone found out how to get reliable information about colliding objects?
Also the Pellet-Engine looks really "ported from C++", not like a typical AS3 project. I could imagine that Adobe would refactor the whole thing at a given time to make it fit more into their AS3 environment. Then, there would also be "real" events for things like that.

Well I answered it myself. I should have noticed that "Pellet" sounds familiar. Like the physics engine used in Blender3D, "Bullet".
And when I looked at the wiki, I found out that Pellet was a clone of Bullet so I could easily port these lines of code to AS3:
// inside onAnimate method of BasicScene
               var numManifolds:int = _dynamicsWorld.getDispatcher().getNumManifolds();
               for (i = 0; i < numManifolds; i++) {
                    var contactManifold:btPersistentManifold = _dynamicsWorld.getDispatcher().getManifoldByIndexInternal(i);
                    var obA:btCollisionObject = contactManifold.getBody0();
                    var obB:btCollisionObject = contactManifold.getBody1();
                    var numContacts:int = contactManifold.getNumContacts();
                    var j:int;
                    for (j = 0; j < numContacts; j++) {
                         var pt:btManifoldPoint = contactManifold.getContactPoint(j);
                         if (pt.getDistance() < 0) {
                              // const btVector3& ptA = pt.getPositionWorldOnA();
                              // const btVector3& ptB = pt.getPositionWorldOnB();
                              // const btVector3& normalOnB = pt.m_normalWorldOnB;
                              trace ("yay, dingdingding! => " + obA + ", " + obB+ " collided!");
I just used the code described here:
http://www.bulletphysics.org/mediawiki-1.5.8/index.php/Collision_Callbacks_and_Triggers
You can get the full documentation here:
http://www.bulletphysics.org/mediawiki-1.5.8/index.php?title=Documentation
Probably everything will also work in Pellet this way, you've just port the code to AS3, no need to even change variable or method names, it seems to be all the same in Pellet.

Similar Messages

  • How to check verison of Best Practice Baseline in existing ECC system?

    Hi Expert,
    How to check verison of Best Practice Baseline in existing ECC system such as v1.603 or v1.604?
    Any help will be appriciate.
    Sayan

    Dear,
    Please go to https://websmp201.sap-ag.de/bestpractices and click on Baseline packages then on right hand side you will see that On which release is SAP Best Practices Baseline package which version is applicable.
    If you are on EHP4 then you can use the v1.604.
    How to Get SAP Best Practices Data Files for Installation (pdf, 278 KB) please refer this link,
    https://websmp201.sap-ag.de/~sapidb/011000358700000421882008E.pdf
    Hope it will help you.
    Regards,
    R.Brahmankar

  • How to handle object in 3D annotation JS Engine

    Hello!
    I have wrote a default js script for 3d annotation that should work with some XML data (on selection event) transferred to this script when the document is initialized.
    While debugging the script I found out, that my root XML object (and all its children) is recognized in the script as [object __External_Object_Wrapper__] and I can do nothing with this object.
    If there is some solution to make 3d annotation script engine 'see' this XML object and its structure so it could be used in the default script.
    XML object is created from attached file with the following code:
    initAttached("MyData1"); // --- function to import data file to "MyData1"
    var oDB = this.getDataObjectContents("MyData1");
    var cDB = util.stringFromStream(oDB);
    c3d.docData=eval(cDB); // --- XML object to work with in 3d annotation selection event
    Thank you for any help!

    Hi again
    Okay, I got it.
    See, there are these little nuances that are hard to pick up sometimes.
    Thanks
    KRistin

  • How to establish the connection - Best Practice

    Following is my code for database connection
    import java.sql.Connection;
    import java.sql.DriverManager;
    import oracle.jdbc.driver.OracleDriver;
    public class DBConnect
         private static Connection connection = null;
         static
              try
                   DriverManager.registerDriver( new OracleDriver() );
                   String url = "jdbc:oracle:thin:@dbserver:1521:ORCL";
                   connection = DriverManager.getConnection( url, "user", "password" );
              catch ( Exception e )
         private DBConnect()
         public static synchronized Connection getConnection()
              return connection;
    }Tell me the Best Practice to establish the connection.
    Edited by: shashiwagh on Feb 1, 2010 11:25 AM
    Edited by: shashiwagh on Feb 1, 2010 11:26 AM

    First, handle your exceptions properly.
    Second, you should not normally create static database connections.
    Third, hardcoding connection data like that is not a good idea.

  • How to Down load SAP Best Practices

    Hi
    How to download SAP Best Practices with S user Id .
    While Downloading system throwing error message - No download authorization  and Please refer to the SAP Note 1037574 .
    Kindly Help.
    Thanks
    ravi

    Hi
    While Downloading the scenario presentation PPT files from SAP Best practices system is throwing below message .
    High security alert!!!
    You are not permitted to download the file "200_Scen_Overview_EN_US.ppt".
    URL = http://help.sap.com/bp_serv603/BBLibrary/Documentation/200_Scen_Overview_EN_US.ppt
    Please help
    Thanks
    Ravi

  • How hashtable handle hash collision?

    From Class Hashtable javadoc
    "in the case of a "hash collision", a single bucket stores multiple entries,
    which must be searched sequentially."
    if a single bucket stores mulitple entries of String object, how
    could mulitple entries be retreived like this situation?
    String s = hasht.get(key)
    I tried a small test myself using two identical hascode "BB" and "Aa" and they get stored in 2 different bucket in hashtable but not mulitple entries as stated at the
    javadoc. Thank you.

    debugger indicatedumm, the hashes are the same so ur right there, you must have read the debugger wrong though
         Entry tab[] = table;
         int hash = key.hashCode();
         int index = (hash & 0x7FFFFFFF) % tab.length;
         for (Entry<K,V> e = tab[index] ; e != null ; e = e.next) {  // right here it is same entry but its like a list inside the bucket
             if ((e.hash == hash) && e.key.equals(key)) {
              V old = e.value;
              e.value = value;
              return old;
    // rehashing stuff removed for post...
         // Creates the new entry.
         Entry<K,V> e = tab[index];
         tab[index] = new Entry<K,V>(hash, key, value, e);
         count++;

  • How to handle [object Object] in textArea (Flex 4.5)

    Hello
    My code:
    protected function myDG_selectionChangeHandler(event:GridSelectionEvent):void
                            var selItems:Vector.<Object> = event.currentTarget.selectedItems;
                                                 var numItems:Number = selItems.length;
                                                for (var i:Number = 0; i<numItems; i++)
                                                      selectedItemsTA.text = selectedItemsTA.text + selItems[i] + "\n";
    Currently I'm just trying to make multiple selections in a datagrid and reflect those in a text area control.
    My selections just come across as [object Object]. So, obviously I don't know for sure what data is behind that.
    It's really not much different from the example here: http://help.adobe.com/en_US/flex/using/WSc2368ca491e3ff923c946c5112135c8ee9e-7fff.html but their textarea is reset to empty each time through, and I'm using a datagrid vs. their list, and of course the event type.
    Thanks
    Kristin

    Hi again
    Okay, I got it.
    See, there are these little nuances that are hard to pick up sometimes.
    Thanks
    KRistin

  • MBAM and BitLocker - How to do it in Best Practice

    Hi!
    I have a situation where I want to implement MBAM in our environment. What I have at the moment:
    1x all-in-one MBAM server (SQL 2012R2 Standard at the same server).
    SCCM 2012R2 CU3 Integration
    GPO´s are ready and published to the correct OU (Laptops)
    MBAM Client is in SCCM and tested - Working great. Not published yet cause we are in pilot at the moment
    MBAM is working fine and all recovery keys are stored in DB.
    My question is - How to deploy MBAM to old computers that are allready in use - The correct way to do it so that recovery keys and TPM recovery password are all stored in MBAM DB? I mean I know how to set MBAM correctly up while using SCCM and TS but I can´t
    get it to work in old computers - TPM passwords are not presented. MBAM Client can´t take ownership of TPM cause Windows has allready done that.
    I was able to get TPM password to MBAM DB if I disable Auto-provisioning and Clearing the TPM
    $tpm=get-wmiobject -class Win32_Tpm -namespace root\cimv2\security\microsofttpm
    $tpm.DisableAutoProvisioning()
    $tpm. SetPhysicalPresenceRequest(22)
    then running MBAM wizard (for the first time!). But how to make it fully automatic so that all computers that are in use will be like that? Do I have to make a script to disable auto-provisioning and then restart and start MBAM or is there any other solution
    for that?
    Best Regards,
    Taavi

    Are you using MDT/SCCM for deployment?
    Can you take a procmon while running the command and then see what all registries it is touching? you can then modify the install.wim of your MDT/SCCM deployment share and add those registry keys there. It depends on hardware to hardware, following registry
    keys worked for me once. by the same way; 
    [HKEY_LOCAL_MACHINE\WimRegistry\ControlSet001\Services\TPM\WMI]
    "NoAutoProvision"=dword:00000001
    "NoDisableOwnerClear"=dword:00000001
    Mayank Sharma Support Engineer at Microsoft working in Enterprise Platform Support.

  • Large object model best practices

    Are there recommended practices for mapping large object models? Seems like there should be API support for this so that developers can automate map generation. I just can not see mapping 100s of classes by hand.
    What about change management? How do folks manage schema changes?
    Feel free to point me at the docs and tell me to FTFM. ;-)

    Thanks for the reply James but I'm still unsure how to avoid hand mapping 100's of classes. Are you suggesting that TopLink can load my object model (1000+ classes) and generate DLL and mappings that will simply work?

  • Converting Physical Exchange Server into virtual environment (P2V) – Best Practices & Tips from the field (Guide)

    Hi, I wrote a 10-pages guide regarding Exchange P2V process which I performs often at organiziations.
    I would like to hear your opinion about this guide, if you have additional information - feel free to contact me at netanel [at] ben-shushan [dot] net.
    Here's the link to the P2V guide:
    http://blogs.microsoft.co.il/files/folders/898538/download.aspx
    Netanel Ben-Shushan, MCSA/E, MCTS, MCITP, Windows Expert-IT Pro MVP. IT Consultant & Trainer | Website (Hebrew): http://www.ben-shushan.net | IT Services: http://www.ben-shushan.net/services | Weblog (Hebrew): http://blogs.microsoft.co.il/blogs/netanelb
    | E-mail: [email protected]

    Hi Netanel, thank your for the useful guidelines. 
    Do you have a similar guide for a Exchange 2010 P2V process? Or the basic guidelines would be generally the same? 
    Best regards
    LJ

  • Best Practices For Portal Content Objects Transport System

    Hi All,
    I am going to make some documentation on Transport Sytem for Portal content objects in Best Practices.
    Please help in out and send me some documents related to SAP Best Practices for transport  for Portal Content Objects.
    Thanks,
    Iqbal Ahmad
    Edited by: Iqbal Ahmad on Sep 15, 2008 6:31 PM

    Hi Iqbal,
    Hope you are doing good
    Well, have a look at these links.
    http://help.sap.com/saphelp_nw04/helpdata/en/91/4931eca9ef05449bfe272289d20b37/frameset.htm
    This document, gives a detailed description.
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/f570c7ee-0901-0010-269b-f743aefad0db
    Hope this helps.
    Cheers,
    Sandeep Tudumu

  • CRM  - how to work with Best Practices

    Hi All,
    we will start with the implementation of mySAP CRM during the next weeks.
    I'm a bit confused - how should I work with Best Practices, and what are the differences between the 3 ways for Best Practices
    1) we have a 'Solution Manager' System where I can use Best Practices for CRM
    2) Best Practices on help.sap.com: http://help.sap.com/bp_crmv250/CRM_DE/html/index_DE.htm (Buliding Blocks!)
    3) Best Practices DVD to install on the CRM System
    Are the 3 ways exchangeable? Is there some information provided by SAP?
    We have already installed the Best Practices DVD, but now I don't know how to use this Add-On: Is there a special transaction-code to use them or a extension for the IMG?
    regards
    Stefan

    Hi Stefan Kübler,
    If the solution manager is in place, then the suggested (also the best) method is to use the best practices on it.
    If you want to install and use the best practices with CRM system then the procedure is given in the best practice CD/DVD. Also you can download the installation procedure from the below link : http://help.sap.com/bp_crmv340/CRM_DE/index.htm. Click on ‘Installation’ on left and then ‘Quick Guide’ on right. Download the document.
    Though the best practices give you a way to start with, but they can’t replace your requirement. You have to configure the system as per your exact business requirement.
    I never installed best practices before, but extensively used them as reference in all my projects.
    Follow the below thread for additional information on  best practices :
    Also refer to my past thread :
    Do not forget to reward if helps.
    Regards,
    Paul Kondaveeti

  • Best practices for file I/O within producer/c​onsumer loops

    I'm looking to add file recording and playback functionality to a pre-existing data collection program.  The original progam is based on a Moore-style state machine, which I have added four additional states to.  They are: Record Start, Record Stop, Playback Start, and Playback Stop.
    What I have done, and what has since been identified as poor programming practice, was to "initialize" (either create or load) the appropriate file within the state machine loop during the "Start" command (for record or playback functionality), and then provide the file reference as an indicator, which is linked to for the appropriate read or write operation(whether I'm playing back or recording).  The actual I/O occurs within the the Consumer Loop. (screenshots attached).
    This is my first labview project outside of tutorials or other small examples, so any advise and constructive criticisims are welcomed.  Specifically with regards to file IO and refnum routing (it gets a little hairy in the consumer loop)!
    I'm running Labview 8.6 on Vista business.
    Attachments:
    Playback Start.JPG ‏71 KB
    Consumer_Loop.JPG ‏122 KB
    File Playback subvi.JPG ‏14 KB

    jamoore84 wrote:
    Ben,
    Thanks for the suggestion.  I think it's a little outside my ken at this moment, but  I'll look it over.  Despite any grevious coding transgressions, I have experienced some limited success with the current setup.  While the use of Action Engines/Functional Globals may constitute the best practice, I might revise my post to read "acceptable and/or easily absorbable practices" instead.
    Are there any other opinions on this?  Let me start by listing a problem and posing a question:
    Problem:  I am able to playback a file only once.  Subsequent attempts at file playback do not work.
    Thanks in advance,
    jimmy 
    HI Jimmy,
    I don't give up easy.
    Let me try to exaplain the issue with race conditons with a contrived example, the
     "Command by Mail box" case.
    Imagine you had a job where you recieved your orders via an old fashioned mail box. You never really saw your supervisor but relied on getting orders via the mail box. Now imagine the mail box could only hold one message and any time a new message was inserted, the old one would fall into the trash.
    So you come to work each day check your mail box do what was ordered and everyone is happy.
    The next day you come in and without your knowing, you are assigned to do the work of two bosses. So as long as you check your mail box more often than the two of them assigne work everything is fine... until you take a day of vacation! So you come back in the day after vacation and check you mail box and work a way until you catch hell for ignoring orders !?! Wel it turn out the order from boss 1 was replaced by the order from boss 2 while you were on vacation. Oh bother!
    How can we fix it?
    1) Expand the mail box so it hold more than one order. You just process them in the oder they are recieved.
    2) Change to mail box to not accept a new order until you have removed the old.
    Now back to reality!
    Local variables act like the funky mail box. The last message insterted over-rides the previous.
    Multiple variable writer ar like multiple bosses.
    Queues operate like an expanded mail box, letting you handle each message in order.
    Action Engines operate like the "mutexed" mail box.
    Why I don't want to encorage you to "just patch up" what you have.
    All of the less than ideal solutions either over-sample (Check e-mail twice as often as bosses assign work, waste CPU, an exercise in futility if you are coding in a non-Real-Time envirionment like Windows) or use a mutex to control access to the shared resource ( in this case local varialbes).
    LV offers mutexes through semaphores (found on the syncronization pallete) but...
    WHY WORK SO HARD?
    In my AE Nugget I explain that the exection of an AE is automatically protected by LV. So in the long run it will actually be easier to learn how to use the AE programming construct than it will be to learn how to solve the problem without them.
    so GO FOR IT! Take the lazy route and learn how to use the AE construct. Use the Syncronization pallete for Queues.  
    Just trying to help,
    Ben
    Ben Rayner
    I am currently active on.. MainStream Preppers
    Rayner's Ridge is under construction

  • New Best Practice for Titles and Lower Thirds?

    Hi everyone,
    In the days of overscanned CRT television broadcasts, the classic Title Safe restrictions and the use of larger, thicker fonts made a lot of sense. These practices are described in numerous references and forum posts.
    Nowadays, much video content will never be broadcast, CRTs are disappearing, and it's easy to post HD video on places like YouTube and Vimeo. As a result, we often see lower thirds and other text really close to the edge of the frame, as well as widespread use of thin (not bold) fonts. Even major broadcast networks are going in this direction.
    So my question is, what are the new standards? How would you define contemporary best practice?
    Thanks for your thoughtful replies!
    Les

    stuckfootage wrote:
    I wish I had a basket of green stars...
    Quoted for stonedposting.
    Bzzzz, crackle..."Discovery One, what is that object?
    Bzz bzz."Not sure, Houston, it looks like a basket...." bzzz
    Crackle...."A bas...zzz.. ket??"
    Bzzz. "My God, It's full of stars!" bzz...crackle.
    Peeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee eeeeeeeeeep!

  • Conversion exit missing in BI - Best practice to install missing exits

    Hi,
      We are on BI 7.0 SP10.
      While doing mappings, I found two conversion Exits MATN2 & SCOPE missing from the BI box. Hence SAP was throwing error while trying to activate the 7.0 datasource.
    On more analysis, I found that the function groups are altogether missing.
    What is the best practice to install these missing objects (Func Groups, Func Mods) in the system.
    Our ABAP person suggested to create these objects as "Repair objects" in the system. Is that the right procedure?
    Please advise.
    Thanks
    Vishno

    I have been through the following steps:
    Entered this URL http://help.sap.com/bp/initial/index.htm
    Clicked on 'Cross-industry Packages'
    Clicked on 'CRM'
    Clicked on 'Englilsh'
    Then the following page is displayed:
    http://help.sap.com/bp_crm70/CRM_DE/HTML/index.htm displayed
    But now what?. How do I get the Best practice instructions for a CRM implemenation?.
    Jason

Maybe you are looking for

  • Remote access VPN with ASA 5510 using DHCP server

    Hi, Can someone please share your knowledge to help me find why I am not able to receive an IP address on remote access VPN connection while I can get an IP address on local DHCP pool? I am trying to setup remote access VPN with ASA 5510. It works wi

  • Preview *****! How do I make Safari use Acrobat Reader?!

    Hi everyone... I'm trying to fill out some forms for work, and there are several problems when I use Safari combined with Preview. Does anyone know how to force Safari to use Acrobat instead? I've already tried re-installing Acrobat Reader, and repai

  • Apple TV doesn't show any wireless networks

    Hi, I was using ATV with my Belkin router for connecting to my home network.Recently, I got timecapsule and setup wireless network which I am able to connect to using iphone and my macbook.I had also setup ATV to connect to wireless network created u

  • How do you set up Outlook Complete app from iKonics

    I get my e-mails from my ISp where my domian name is parked and I have an e-mail forwarding facility. But.. I bought the iKonics Outlook Complete app but it won't work. Any ideas?

  • Clarrification about JPR involvment in  Value Mapping Replication

    Hi All, I am new to this PI topic. Recently started learning PI. Currently looking at JPR. I have seen a scenario where JPR is involved in ValueMapping Replication. Can anyone please explain how this happens actually? Please provide a detailed flow o