Tag Info

New answers tagged

2

I've managed to get it working, thanks to @UnholySheep for convincing me that I was on the right track which helped me through some head scratching. Things move smoothly now, and the balls don't stick together either. I've changed my ballBounce() function to return a bool if there is still a collision/overlap so that my main game loop will iterate again, up ...


0

I had similar issue, but my character stopped at some points. After adjusting rigidbody mass and physics material friction, it worked. Maybe it will work in your case.


0

I've already got a pretty reasonable answer to this over here, with some video examples. The short version is: You cannot reasonably use rigid body physics to simulate biped locomotion in the kind of responsive way you'd want for a platformer. You have to do something else.


1

When you want it to be physically credible, all of your objects will accelerate slowly and not instantly. So add/subtract an amount of speed from the current speed of your object which is proportional to the current tilt factor. To prevent your object from accelerating and moving indefinitely, there is friction. Friction increases quadratically with speed. ...


0

This exact same question from the exact same person has already been answered on another site. http://www.html5gamedevs.com/topic/8824-p2-motorized-hinge-joint/ You can use the motor in the joint to create the rotation around the joint: To make things simpler, how about enabling the motor on the constraint? constraint.enableMotor(); ...


1

Apply two forces in opposite directions. The one at the far end of the wing turns it. The other at the hinge - applied to the wing not the body at that point - zeros out the first so the whole craft doesn't move. Note that the far-end force is perpendicular to the line from the hinge to where it is applied. That's not essential, but it won't accomplish ...


1

I'd look into spring systems first before diving straight into fluid dynamics. They can help building a somewhat stable cell structure, and you can visualize this with normal effort (e.g. using alpha-blended particles, iso-lines, image-based effects on top of convex hulls etc..) Fluid dynamics and final-element simulations are of course much more realistic ...


7

What may be a good way of simulating entities which may vary a lot is to use a force field that you draw with a marching square algorithm. So the eating entity would be a set of fields that you have moving together using a flocking strategy or similar, to get a 'cell' effect. You have to use a number of force field large enough to allow for opening a ...


5

Fluid dynamics is one of those super hard things to set up, that once you've got it working allows for a whole range of interesting effects. It's probably overkill for most games, unless you actually need things to move like a fluid (as in, flow from one point to another). For soft-body masses, I would considering instead using nets of springs to simulate ...


1

Regarding your gravitation/acceleration physics, here's your code again with a bit of reformatting: function world.update(t) for k, v in pairs(world.objects) do if v.Static ~= true then v.Position.X = v.Position.X + v.Velocity.X if v.onGround == false then if v.Velocity.Y < world.Gravity then ...


1

Invisible: Don't add any components that render to the screen, i.e. mesh renderer, sprite renderer, line renderer, etc. Collidable: Add a physics collider to the object and set the bounds how you like. Non-solid: Make the collider a trigger. Triggers will trigger a collision event, but won't have a collision response, essentially making them non-solid ...



Top 50 recent answers are included