Tails, physics and collisions

0 favourites
  • 5 posts
From the Asset Store
Particles support animations, collisions, effects and etc.
  • Hi everyone!

    Today I am trying to make a character with a tail. I want the tail to flow realistically and follow the movement of the character.

    So far I have done this by making the tail a series of nodes pinned together using the Rope style Pin functionality. This looks very nice, but I also want the tail to have physical properties, I want it to have momentum and gravity. (Most importantly to fall and trail along the ground)

    However using the built in physics gives me some really messed up results. The tail twitches and spasms and actually pushes the player around. Plus it feels as heavy as a sack of sand. I can't find a way to actually adjust physics properties such as mass and gravity for specific objects, which seems a rather gross oversight.

    So I guess my question is... how can I give the nodes of my tail mass and momentum?

    I'm just looking for any neat ideas that people may have!

  • Additional note:

    I have tried to use limited rotate joints but that either makes the tail stiff, spasm-ey, and still heavy and clunky. And I know there is a 'Mass' option in the physics properties, it just doesn't seem to do anything?

  • Maybe... Maybe if each node of the tail had some momentum variables such as speed and angle, and used that for movement.

    But how would I calculate their momentum? Perhaps take a snapshot of their position each tick, and compare to the position next tick, then use this to calcuate their velocity and angle of motion, then move them accordingly.

    hmm... I'll give it a go.

  • well if you using physics. make sure your not using pin behaviour. use joints in the physics.

    be sure to reduce the weight, friction of the tail pieces and any other values.

    I created a tail for a game once, and that took a large number of adjustements. but the results work out fairly nicley. though if there was too much momentum the dragon would get smacked by it's own tail and pushed around :D

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • I've managed to get it working pretty nice with my own little physics system, the tail flows about and flaps in the breeze like a scarf.

    The only problem left is gravity. Just moving each node of the tail towards the floor doesn't work properly.

    I need to... I need to add a gravity function to my custom physics thing. Yes that's what I need to do. But how would I do that. Currently it takes an angle of motion and a velocity to work out momentum. What I ideally want is for the angle of motion to slowly move towards 90 degrees (downwards), that way things will fall in a realistic arc. And when the angle is below the horizon I need the velocity to increase rather than reduce.

    Hmmm.... . .. . ... .. . .. . . . . . ..... . . .   

    The problem is that currently the angle of motion is set every 0.00001 seconds, so it can't gradually change. I guess I'd need a separate variable for the angle of momentum which would affect the angle of motion. So the angle of motion would take in the effects of gravity alongside momentum.

    Hmmm... I think maybe I need some coffee.

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