Tagged Questions
3
votes
2answers
89 views
Why are my Box2D wheels slipping on ground?
I have a car, set up in Box2D as a rectangle connected with two wheels using WheelJoints:
The wheels are defined as follows:
FixtureDef wheelFixtureDef = new FixtureDef();
...
0
votes
0answers
36 views
sprite reset method not working in update thread(andengine)
I have sprite array with length of 8 and I am trying to reset sprites position in scene's update thread but it doesn't work. However I tried to reset sprites in sprites modifier listner which works. I ...
2
votes
2answers
125 views
how do I create a moving type of block like in Mario[box2d]
I want to create a block which only moves up and only when hit from below. I am trying out a distance joint and I read it can be used as a spring, is this the correct solution?
the way I have tried ...
0
votes
0answers
42 views
setChaseEntity freezes or jitters the AnimatedSprite
I'm trying to implement setChaseEntity method in a physics based app. I wrote the below code which has an animated sprite ans as the player. The player is movable and it can jump. When i try to focus ...
0
votes
1answer
80 views
Player doesn't jumps in Box2D implementation [closed]
Well, i'm trying to learn andEngine. I was able to successfully implement the move functionality for the player. Now, i'm trying to make the player jump using Box2D. I referred few online tutorials to ...
0
votes
0answers
41 views
Apply impulse to ball to a fixed height Jbox2D android
I have to hit a ball to a fixed height repeatedly as shown in the following image.
This game is similar to
1983 Hitit
The difference is the hitting y axis will be variable. I wanted to hit the ...
2
votes
2answers
143 views
How do I create a horizontally centered “gravity line”?
Here's my ideal scenario: A game object (in blue) can change its horizontal velocity, but it will be pulled back by gravity (dotted gray arrows) toward a central vertical line (in red).
How can I ...
0
votes
0answers
79 views
Physics don't apply on a unique body AndEngine
I am developing a game in AndEngine so far I managed to create everything I wanted for my sprite that was connected to a BoxBody. I was rotating it moving it everything was great. I wanted my ...
3
votes
3answers
755 views
How to make Box2D bodies automatically return to a initial rotation
I have two long Box2D bodies, that can collide while moving one of them around with MouseJoint. I want them to try to hold their position and rotation.
Blue body is moved using MouseJoint (yellow) ...
0
votes
1answer
225 views
Remove a body when touched in LibGDX(Box2D)
I am using LibGDX to create a new project.
What i am trying to do is, i load bodies from a tmx file into levels which works fine. The bodies also has a sprite with them.
The problem is, is i would ...
1
vote
2answers
344 views
How do I make a Box2D object that makes objects passing through it slower?
I wish to have a sort of "slow motion" or "slow down" effect on a players character when they walk in a mud area, usually the character velocity is 3f constant in any one direction. The problem is I ...
0
votes
1answer
182 views
Getting body position
I am using BodyA.getPosition().x and BodyA.getPosition().y to get the x and y vector of a body location so i may attach some text above its head, but the log of that position prints out something like ...
0
votes
1answer
287 views
Showing trajectory indicator
From the image you can see that the ball fired on the left that fire behind it, does not match the calculated trajectory. Im drawing the ball trajectory using an equation from a SO question, this is ...
0
votes
0answers
211 views
Box2D revoluteJoint Motor speed,Max torque scaling for diff Devices
Hi i am using Box2d Revolute Joint as a joint for wheel it's connect to Wheel and Body of my Car i am using RUBE for creating the Box2D world
Prob.
i am using a scaling floating point number to scale ...
0
votes
0answers
371 views
Libgdx - Box2D: Attach Physics Body Editor Loader mask to dynamic texture
I have a texture of a circle, which gets drawn to a new position when a touch drag occurs. It isn’t set up as a body.
I have made a physics map using Aurelien Ribon's Physics Body Editor Loader GUI ...
2
votes
2answers
110 views
AndEngine: edit elasticity on action
I'm making a game for Android with AndEngine.
It's going quite well, but now I'm stuck on something.
My main character has a elasticity set in its fixturedef so it bounces around throughout the ...
4
votes
1answer
668 views
How would I make an air hockey AI?
I am making an air hockey game for Android using AndEngine and its Box2D extension.
How would I make an AI for an air hockey game? For it to work the AI would not only need to move its paddle side ...
0
votes
1answer
866 views
JBox2D simple example for Android? [closed]
I'm starting to develop an Android game. I've already installed jBox2D but I can't find complete code to develop a simple application from scratch using this framework.
Thanks in advance!
-1
votes
1answer
1k views
Create Box2D and engine polygon Box2D body without sprite
Hey I have created my body using following code: (please read full description)
Body polyBody;
final BodyDef mBodyDef = new BodyDef();
mBodyDef.type = BodyDef.BodyType.DynamicBody;
...
4
votes
3answers
3k views
Box 2d Level Editor for AndEngine
I am getting started with Box2d in AndEngine.
I need to know if there is any level editor to be used with box2d and gives output capatable with AndEngine.
Is there any tool which can help me building ...
2
votes
2answers
951 views
How do I get the touch event on a body in Box2d(Java)
I have various bodies rotated at some angle with the help of Box2d in libGDX. What I want is to destroy the body when I click on it, but the problem is that I am not able to get the area definition of ...
-1
votes
2answers
257 views
Single and Double Jump with single button.
I want to make Single Jump on Single Tap and Double Jump on Double Tap. My problem is that if I make double Tap on ground then it’s fine but if I make first Tap on ground and second Tap in Air then ...
1
vote
1answer
346 views
AndEngine Box2d game
I'm developing a 2d survival shooter using Box2d extension and I've got some questions:
I have two AnalogOnScreenControls. Their listeners modify both
sprites and bodies. I receive TouchEventPool ...
2
votes
1answer
568 views
RagDoll in AndEngine
I want to create a RagDoll body in andEngine which can run and jump over different jumpObjects. Can any one give a nice tutorial on how to create RagDoll body and how to move it, like jump and ...
3
votes
1answer
1k views
Andengine. Put bullet to pool, when it leaves screen
i'm creating a bullet with physics body. Bullet class (extends Sprite class) has die() method, which unregister physics connector, hide sprite and put it in pool
public void die() {
...
1
vote
1answer
973 views
AndEngine Physics: Shape rotating but not updating physics effects
I was looking at PhysicsExample from AndEngine's Examples. I made the following change that I added a vertical line shape and created a fixture for it. Then I registered a rotation modifier for that ...
7
votes
4answers
2k views
How do I make my rain effect look more like rain and less like snowfall?
I am making a game in that game I want a rain effect. I am little bit far from this right now. I am creating the rain effect like below:
particleSystem.addParticleInitializer(new ColorInitializer(1, ...
4
votes
3answers
553 views
Box2d Collision problem
I'm not good with words so here's a picture to describe my problem:
In my game there is this big ball which the user can move on x-axis only. Now, if the ball is falling like the red one, it's ...
3
votes
3answers
564 views
Why does creating dynamic bodies in JBox2D freeze my app?
My game hangs/freezes when I create dynamic bullet objects with Box2D and I don't know why. I am making a game where the main character can shoot bullets by the user tapping on the screen. Each touch ...
0
votes
2answers
1k views
Making body (box2d) a sprite (andengine) in Android
I can't make body (box2d) a sprite (andengine) and at the same time apply MoveModifier to sprite which is body. If i can make just body, it works namely the sprites can collide. If I apply just ...
5
votes
1answer
3k views
Box2D Difference Between WorldCenter and Position
So this problem has been brothering for a couple of days now. First off, what is the difference between say Body.getWorldCenter() and Body.getPosition(). I heard that WorldCenter might have to do ...
1
vote
1answer
2k views
How would I use JBox2d in Java?
So I did some research and a found Box2d. I then proceeded to download it and the testbed. Now that i have it, I don't know how to properly use it. I'm looking for a clear simple answer on how to ...
3
votes
1answer
2k views
AndEngine Moving a Connected Texture and Physics Body
In AndEngine, many times we create a TextureRegion for our sprite. We can move this region around the scene but when I connect that region to a physics body I end up being able to use either one to ...
2
votes
1answer
982 views
How to setup JBox2D
I resently downloaded the JBox2D but how do I set this up?..
Its jbox2d-2.1.2.2 All I can see is a bunch of code and folders.
Any websites with step by step tutorial??
You know how??
5
votes
1answer
725 views
How to create multiple balloon bodies in Box2D?
In Box2D, how would I go about making a body that's being lifted by multiple "balloons"? These balloons would have to be able to be destroyed (for example, by a bow and arrow).
3
votes
2answers
1k views
Why does my position interpolation code result in “jumpy” motion?
I am developing an android game with box2d and use a fixed timestep system for advancing the physics.
However as I use this system it requires the box2d positions to be interpolates. I read this ...
2
votes
1answer
1k views
2D physics performance on iPhone/Android using Unity 3D?
I've been looking into making 2D games with Unity. One thing which concerns me is the performance of the physics engine. Since Unity is a 3D game engine I'm going to have to assume it uses a 3D ...
0
votes
2answers
1k views
How to use the box2d contact listener in android (java port)?
I don't have any idea about the box2d collision detection in android. I googled and got results that suggest to use the contact listener but I don't know how to use it in android java.
6
votes
3answers
7k views
How to remove a box2d body when collision happens?
I’m still new to java and android programming and I am having so much trouble Removing an object when collision happens.
I looked around the web and found that I should never handle removing BOX2D ...