make swinging animated object collision

Discussion in 'How Can I...?' started by sampathkumar914, Nov 8, 2015.

  1. sampathkumar914

    sampathkumar914 Boxer

    Joined:
    Oct 30, 2015
    Messages:
    16
    Likes Received:
    1
    Hi,
    how can i make an animated swinging object collision area swinging with object. I'm attaching image link you can guess what i,m looking for. As you can see when it swings the collision area stays constant doent move along with object. Can anyone help me how can i acheive
    https://drive.google.com/file/d/0BxRAfmKijC7wYWZ4am1sTGZzYnM/view
     
  2. sysads

    sysads Serious Boxer

    Joined:
    Oct 8, 2015
    Messages:
    885
    Likes Received:
    353
    Can you activate debug mode and send screenshot showing what you are seeing. I am assuming there are two parts to the swinging object - pole and spike head.
     
  3. sampathkumar914

    sampathkumar914 Boxer

    Joined:
    Oct 30, 2015
    Messages:
    16
    Likes Received:
    1
  4. sampathkumar914

    sampathkumar914 Boxer

    Joined:
    Oct 30, 2015
    Messages:
    16
    Likes Received:
    1
  5. sampathkumar914

    sampathkumar914 Boxer

    Joined:
    Oct 30, 2015
    Messages:
    16
    Likes Received:
    1
    As you see both image it is swinging but the collision area doesnt.
     
  6. trudnai

    trudnai Miniboss Boxer

    Joined:
    Sep 25, 2015
    Messages:
    1,235
    Likes Received:
    701
    Maybe you want to describe a little bit more about the setup of your swing.

    I wanted to test your swing and therefore created one. The swing itself works for me as expected in terms the collision shape moves fine with the object. I just have a different weird results on the player: The object is resized (the collision shape still holds the right dimension, but the sprite is strangely resized)

    This is how it "should" look like:

    Screen Shot 2015-11-08 at 2.51.12 PM.png

    This is the connection with debug scope (the horizontal is a fixed platform, the ball is a wheel with 0 torque and speed connected to the platform, the handle of the hammer is physics platform type and the hammer head is a fixed platform type which is pushing the character (the ball) away if in contact):

    Screen Shot 2015-11-08 at 2.49.30 PM.png

    And this is the results on the player - everything works, the collision shape moves with the hammer head, but the sprite shape is not what I have set...:

    Screen Shot 2015-11-08 at 2.49.14 PM.png

    Anybody else has this? Did I do anything wrong?
     
  7. sampathkumar914

    sampathkumar914 Boxer

    Joined:
    Oct 30, 2015
    Messages:
    16
    Likes Received:
    1
    thanks I will try
     
  8. sysads

    sysads Serious Boxer

    Joined:
    Oct 8, 2015
    Messages:
    885
    Likes Received:
    353
    On which of the object did you set the angular velocity? Also the solution is to link the object with the angular velocity to the swing spikes as the parent and that would work.
     
  9. sampathkumar914

    sampathkumar914 Boxer

    Joined:
    Oct 30, 2015
    Messages:
    16
    Likes Received:
    1
    actually i have image which is animated the handle and spikes all are single image sprite which will animate. used spriter to create the animation image do i use individual image for spikes and chain or can i achieve with that animated sprite.
     
  10. mattrouse

    mattrouse Boxer

    Joined:
    Dec 12, 2015
    Messages:
    11
    Likes Received:
    2
    Did you find a solution this issue? I am trying to make a pendulum style object and having a similar issue.
     
  11. sampathkumar914

    sampathkumar914 Boxer

    Joined:
    Oct 30, 2015
    Messages:
    16
    Likes Received:
    1
    I got it, i took a chain, a stick and the bottom pendulum. I gave angular velocity to stick position fixed and attached chain and pendulum to it. And when stick moves using logic transform changing angular velocity from positive to negative.
     

Share This Page