Tag Info

Hot answers tagged

3

It's because of the discreet time and the way you integrate. Because you step time forward at 1/50 of a second you're not guaranteed to hit the actual apex of 4.0, the delta is just not granular enough. (Try setting the delta time to 1/5000 and you'll see that it gets closer to 4, obviously that won't work for your game but it will show you the effect). ...


2

For a one-off change of velocity, I'd recommend changing velocity yourself. So rather than applying a force to the object, try something like rigidbody2D.velocity += shooter.velocity after you create the shot and figure out the regular shooting velocity. Secondly, it'd probably be best not to count on the speed difference to avoid the shooter being ...


1

It does not stop, if you don't have friction and gravity, that in normal world slow you down. When applying force, you are really not adding force at all and in fact i am bit surprised that it actually moves at all. You should apply more force, to get your object moving. Try something like this. Vector2.right = Thats the direction of the force Multiply by ...


1

Consider reading books about realworld physics. "In physics, a force is any interaction which tends to change the motion of an object." - Wikipedia. So... By applying force you make it accelerate and decelerate. You need to have friction or don't use physics at all to make it stop at the end of button press.


1

One simple way to simulate soft bodies is to connect together small rigid bodies with elastic joints. Then the difficult part is to fine tune your model's parameters and map the texture to the underlying model. The following blog post provides an implementation of a deformable ball with cocos2d engine: ...



Only top voted, non community-wiki answers of a minimum length are eligible