My computer does not know how to add I think
I am trying to implement the physics of a canon-ball (a little cumbersome code and that is fine and I don't really need to change it as I am learning). I think I have done physics numerical method...
View ArticleOnTriggerStay2D do not called every fixedUpdate
i am using unity 5.4.2f2 Personal, and i think 5.3 has the same issue. OnTriggerStay2D do not called every fixedUpdate. to reproduce, do like below: (1) two gameObject objA and objB, both with a...
View ArticleIncreasing performance with physics 2d settings
can anyone give me an example of increased performance physics 2d settings with low quality physics? My app is lagging in my android phone because of physics. I want to decrease quality of its...
View ArticleFrictionless space
Hey I'm making a 2D space shooter, I have my player moving friction-less like I want and collisions with asteroids work, but when the player collides with an explosion the player slows down which is...
View ArticleRigidbody2D.IsSleeping issue
When checking the velocity of an object with ...velocity.x == 0 && velocity.y == 0 everything works fine but if i use Rigidbody2D.IsSleeping there seems to be a small delay? if (rb.IsSleeping)...
View ArticleOnCollsionExit2D gets invoked wrongly even when the character is colliding...
Hi All, This is my first post. I am trying to use Physics2D.IgnoreLayerCollision to ignore collision between the player and the platform when the player jumps from under it. It works fine without any...
View ArticleSnake Movement Like in Snake vs Box
I am stuck at achieving snake movement of game Snake VS Box. can anyone help me.
View ArticleHow to enable the collision between two objects after using...
Hi, After using the Physics2D.IgnoreCollision() fonction, I've been trying to re enable the collision between the object but I can't find any solution. Is there any fonction that can do the opposite of...
View ArticleOnTriggerEnter2D first collision causes lag/freeze
Hey all, I'm currently developing a mobile game and I ran into a small problem. When my player first collides with an enemy, the game freezes for a bit. The weird thing is that this happens only when...
View ArticleHow can I make 2D physics bounce the same as the 'multiply' bounce combine...
In 3D physics materials, we have the setting of 'Bounce Combine' which dictates how the two physics materials bounciness values combine together to determine the overall bounce of the collision. The...
View Article2D muscle joint?
Hello! I have two RigidBody2D's connected to each other by a HingeJoint2D. I'm looking for a way of connecting one or many "muscles" between them. Like a spring/distance joint that I can...
View ArticleWhen to use Effectors instead of scripting the behavior?
Performance wise or any other aspect, what are the scenarios that dictate the effectors as the right tool to use?
View ArticleHow to change distance but maintain speed and height of jump
Suppose I have a block (RigidBody2d) traveling on a flat surface at a constant velocity to the right. The block jumps when the player presses the jump key, and the rigidbody has a force added onto it...
View ArticleOptimal way to check repeatedly close objects
Hi, I am developing simple flammable object. I have made it but i am having second thoughts on implementation. I have flammable object that can catch fire.Every flammable object that is on fire cast...
View ArticleFerr2d terrain physics material does not affect
I have sliding gameobject with polygon collider2D and two ferr2D terrains with different physic materials. First one have friction 0 and the second one 5. But when my gameobject slides throught/across...
View ArticleHow to detect what Gameobjects are in a Collider2D? (C#)
I am making a tower defense game (2D) and I am working on making the towers shoot the enemies. I want my turrent to shoot every 1 second and hit the enemy the closest to the front. My solution to this...
View ArticleRigidbody2D is kind of flying instead of falling when the child box is colliding
Hi everyone, I got a strange issue, everything is in the title, but i'll add some details : I'm making a 2D side scroller game, the player can move on X and Y axes like in Castle Crashers. So the...
View ArticleGround Check Issue
So ive been following the 2d controllers tutorial and he was covering the groundcheck and falling physics. The problem im having is that when the player is not on ground, the ground boolean does check...
View Articledropping series of masses connected by spring
I am trying to show how a series of 2D masses connected by string will fall. I have connected 10 masses with a spring joint. However they all fall at the same time. I would like to make the simulation...
View ArticleHow to see if two objects are touching each other
So, I am trying to check if two objects are touching each other, and this is the part of the script that I cant get to work public static bool IsTouchingS (BoxCollider2D.StraightS,...
View Article