Quantcast
Channel: Questions in topic: "physics 2d"
Browsing latest articles
Browse All 132 View Live
↧

OnTriggerStay2D 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 Article


Increasing 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 Article


Frictionless 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 Article

Rigidbody2D.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 Article

OnCollsionExit2D 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 Article


Snake Movement Like in Snake vs Box

I am stuck at achieving snake movement of game Snake VS Box. can anyone help me.

View Article

How 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 Article

OnTriggerEnter2D 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 Article


How 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 Article


2D 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 Article

Handling Slopes

Hi Folks, I'm a pretty newbie developer who's been using tutorial to expand their knowledge of game design etc. I've recently started working with a Super Meat Boy style character controller, which is...

View Article

How do I do a Snappy Jump in 2D with my 2D Jump Script?

I have a working Jump Script, but the Jump is not as Snappy as I need. I want the Player to Jump immidiately, not Float up a bit and then Jump, like in Version 0.0.2 of [the Game I'm...

View Article

[Optimization] - Is "Generate Physics shape", in Import settings, necessary...

Hi, sorry if this is maybe a stupid question but, I was searching about how the option "Generate physics shape" works in Import settings when importing an image to my project and I have found nothing...

View Article


How to make Two colliders, don't collide, but still be able of interact with...

Hi, i'm currently developping a game with unity3d (2019.3 version). My problem actualy, is that I don't know how to make two colliders don't collide with each other, but still be able to interact....

View Article

2D projectile motion calculation problem and passing different variables

Hey everyone, I am a bit stuck here because I am newbie in Unity. So, I am making a turn based game where player shoots ball at the enemy and then enemy shots back. It is based on real projectile...

View Article


How do i make this physics with unity

Hi all i am looking for some material to do new game how do i make physics like the picture below how must i search about the same physics in youtube or forum ![alt text][1] [1]:...

View Article

deltaTime doesn't work with custom gravity (ECS)

Hi, I'm making a 2d sandbox game, and I'm trying to make my own physics using ECS, but I have a problem with gravity: every frame I move all the entities that have a custom collider attached by an...

View Article


[2d] When I shoot bullets they have different speeds

Hello, I have a 2d platforming shooter where the player can shoot where the mouse aims. Everything works, the aiming and shooting are all functional, but for some reason even if I shoot in the same...

View Article

Change Collider2D size at runtime

I'm trying to create a trigger collider that encapsulates all of its children. I use it to define a room, so the camera is limited to move within the room while the player is inside of it. When the...

View Article

Need help with physics based 2D character [SOLVED]

I have a character (chouette) that can jump twice in the direction of the mouse pointer when mouse0 is clicked. When he hits the ground the movement script is temporarely disabled to let the sprite...

View Article

Trying to create a '2D 8 Ball Pool' game - Trajectory Prediction

I am trying to create a game similar to (Pocket Run Pool) https://www.youtube.com/watch?v=ewlAE6NQnsI&t=215s a 2D pool game that is much simpler than a 3D one I need help with creating code for...

View Article


LineRender and Gizmos.DrawRay are showing different results for the same...

@jackmw94 @hexagonius I am supplying the same inputs for both Gizmos.DrawRay and my LineRender but the **output lines dont match each other**. I want the **resulting LineRender** to draw the same line...

View Article


Enemies in top down shooter being affected by physics of bullet

Hi, I am making a top down shooter mobile game, and I want to know how to make the player's bullets not push the enemies around. The enemy gets pushed back a little bit by each projectile that the...

View Article

Physics scenes copy all colliders etc from main scene

Hello, I am trying to use physic scenes to perform some simulations outside of the main scene. That being said, I need all of the colliders from the main scene in the physics scenes. What is the...

View Article

AddExplosionForce 2d workaround not working

I'm attempting to create a basic explosion in Unity 2d engine. Unfortunately the unity function addExplosionForce doesn't natively work with 2d rigidbodies, but I was able to find the following...

View Article


How to pick up an object and make it follow the cursor, but realistically?

We're making a 2D game where one of the main mechanics is picking up objects with a cursor and positioning them properly (i.e. picking up a log, rotating it and leaning on a wall, so you can use it as...

View Article

,Invert one of colliders

![alt text][1] [1]: /storage/temp/196253-block-example.png Hi, I am making 2d game where I play with unity physics. The game is about dropping different block prefabs from above down and making some...

View Article

How to generate the physics shape when importing SVG?

I'm using the package `Vector Graphics v2.0-preview.20` in order to import SVGs. I've checked the `Generate physics shape` option in order to have automatic physics on these objects. However, either...

View Article

Enabling collisions after a GameObject has started moving. Unity 2D

I'm working on a small 2D tile-based platformer. I have one 2D capsule GameObject that acts as a placeholder for the player. The "Player" has a Rigidbody and a Capsule collider attached. They drop into...

View Article



Add colliders to screen edge.

I am building a simple single screen game (pong just to do a project without a tutorial) and i want it to work on multiple resolutions. Therefore i need to attatch colliders and paddles to the screen...

View Article
Browsing latest articles
Browse All 132 View Live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>