User Tag List

Results 1 to 5 of 5

Thread: "Box2d" How to damage an object using velocty

  1. #1
    Clicker Fusion 2.5Android Export ModuleiOS Export ModuleSWF Export Module
    leightonw87's Avatar
    Join Date
    Jan 2012
    Posts
    95
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Question "Box2d" How to damage an object using velocty

    Hi all, I'm making a game like angry birds but involves a cannon, I added eggs to it and I now want to be able to inflict damage against the eggs as they fall, I've looked on google but can only find info on how to do it for the action script version, I can't follow the code as I'm not really good at understanding it.

    I think someone says about using impulses or postsolve(), I haven't got a clue how to though.

  2. #2
    Clicker Fusion 2.5Android Export ModuleiOS Export ModuleSWF Export Module
    leightonw87's Avatar
    Join Date
    Jan 2012
    Posts
    95
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Exclamation Sorry for bumping

    Sorry about this but I really need help with this as I can't figure this thing out, I need to cause damage to an object from the force of another object landing on the said object. I've tried numerous things but can't figure it out.

  3. #3
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleHTML5 Export ModuleiOS Export ModuleUniversal Windows Platform Export ModuleSWF Export ModuleXNA Export Module
    DTownTony's Avatar
    Join Date
    Sep 2010
    Location
    Detroit
    Posts
    428
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I did it by checking when 2 types collide and subtracting the velocity and the mass of Collision Body 1 from Collision Body 2's life and vice versa. It's not exact by any stretch, and kinda dirty, but it works good enough...sorta

  4. #4
    Clicker Fusion 2.5Android Export ModuleiOS Export ModuleSWF Export Module
    leightonw87's Avatar
    Join Date
    Jan 2012
    Posts
    95
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Thanks but another noobish question?

    Quote Originally Posted by DTownTony View Post
    I did it by checking when 2 types collide and subtracting the velocity and the mass of Collision Body 1 from Collision Body 2's life and vice versa. It's not exact by any stretch, and kinda dirty, but it works good enough...sorta
    I got a bit of a newbish question here but how do I get the collision to register, I can't for the life of me get it to register. lol

  5. #5
    Clicker Fusion 2.5Android Export ModuleiOS Export ModuleSWF Export Module
    leightonw87's Avatar
    Join Date
    Jan 2012
    Posts
    95
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I've figured it out now but collisions are not very accurate and very dirty but it will work, just need to tweak my code alot to get it to work.

    Thanks again DTownTony for helping with damage.

Similar Threads

  1. "Load text file" from "The Edit Object" BUG?
    By MOBii in forum Multimedia Fusion 2 - Technical Support
    Replies: 1
    Last Post: 19th December 2013, 05:43 AM
  2. Issues with "Overlapping an Object / background" and 'User Clicks".
    By redpandagames in forum SWF/Flash Export Module Version 2.0
    Replies: 2
    Last Post: 6th November 2012, 04:41 AM
  3. Box2D "Disable Collision Types" not working?
    By gastrop0d in forum Multimedia Fusion 2 - Technical Support
    Replies: 2
    Last Post: 23rd December 2011, 12:32 AM
  4. Issues with "Clickteam Movement Controller" and "Runtime" Object
    By jimmyorpheus in forum iOS Export Module Version 2.0
    Replies: 1
    Last Post: 29th November 2011, 07:10 AM

Posting Permissions

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