Physics and Mouse...

0 favourites
  • 6 posts
From the Asset Store
Total customisation of the input! You can combine inputs from all peripherals. Make your game accessible for everyone!
  • Hi!

    I tried to find a solution, but I can't...

    For example we a have a physic ball on the stage. I need to make the following - grab a ball with mouse and throw it somewhere...

    1) The ball should not floating around a cursor (like in using "force toward a point" in construct examples.

    2) The speed of the ball after whe release a mouse button should depends on the speed of cursor while we make a "throw movement"

    Hope, you understand right... <img src="smileys/smiley4.gif" border="0" align="middle" />

  • Working on an example for you now ;)

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • Thank you!

    I think if you succeed, it will be a very useful example to any new construct user...

  • Here you go!

    I think this is what you wanted. Note that the ball loses all collision while being dragged. If this is unacceptable, the solution will be more complicated (you'd use a custom movement behavior) but for most applications I don't see it being too much of a problem. The ball also loses all angular velocity on drag, but again keeping this seems to me fairly useless.

    Hope this helped!

  • Thahx!

    It's a good solution! <img src="smileys/smiley1.gif" border="0" align="middle" />

    But are there a variants not to change the balls during draging? If we can drag a physic object in the same way, it solves the problem with lost collisions...

    In a hole, I want to create a sandbox with a ragdoll... that's why I have such tasks.

    If I apply your method and try to grab a head of my ragdoll - will the rest parts be in physic mode and react to "world gravity", collisions etc? I think there will be a problems and multiple bugs..

    What do you think, sqiddster?

  • Hmm, that is a problem. I'm not quite sure if there's any other reliable way to do it.

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)