Unity - Activating "is Trigger" makes stuff fall through objects [closed] - unity3d

Closed. This question needs debugging details. It is not currently accepting answers.
Edit the question to include desired behavior, a specific problem or error, and the shortest code necessary to reproduce the problem. This will help others answer the question.
Closed 2 years ago.
Improve this question
I am following this tutorial: https://www.mvcode.com/lessons/roll-a-ball-obstacle-course
At the very end we created enemies (cubes) and their movement works very good. But as soon as I activate "is Trigger" they fall through the plane into the void. What am I missing?
I tried to pull them above the floor to have some space between the bottom and the enemies, but they keep falling through the floor and only when I got "is Trigger" enabled.
thanks in advance,
Akuma

Alternatively (for those people who want or need gravity enabled on their cubes):
Add a second collider.
There's literally nothing stopping you from doing this. You can make the trigger one bigger or just tweak the physics layers collision settings so that the collider keeping the enemies on the ground doesn't interfere with the operation of colliding with the player, etc.

It's likely that the cube is on top of the floor. When you enable "Is Trigger", collision is disabled and the cube would go through the floor.
The solution is to disable "Use Gravity" on the cube's Rigidbody.
Note that you are following a plagiarized version of the original "Roll-a-ball tutorial" tutorial which left out so many things. You should be following the original tutorial here. Watch the 10 seconds from this video which describes what you missed which is what I described above.

Related

Why is my player falling through the floor? [closed]

Closed. This question needs debugging details. It is not currently accepting answers.
Edit the question to include desired behavior, a specific problem or error, and the shortest code necessary to reproduce the problem. This will help others answer the question.
Closed 3 years ago.
Improve this question
I have just created a repository on Github with my project.
The problem I having is my player falls right through the floor. If I import Standard Assets and use theis first person character, This does not happen. I am assuming it is an issue of using vectors, but I do not know.
Identify Issue
It mostly happen when there is cno collider attached to the body but you try to
apply gravity to gameobject . The gameobject tries to move towards down due to the gravity but the collision helps that object to sustain on its place .
Apply any of below solutions
Remove the gravity applied on the body
Attach the Collider that help the gameobject stopping it from falling it down
Check the x y and z axis as well. Click on the gameObject it will tell you its axis . Adjust your axis according to the logic you have applied

Unity2d shooting while running [closed]

Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 4 years ago.
Improve this question
When I shoot a projectile while running the projectile collides with the player, i.e. the player's collider is hitting the bullet's collider.
What is the best way to prevent this? By making a space between the gun and the projectile to avoid collision?
There are 2 ways I can think of right now.
1- You can create a selective collision script (or edit your existing one) and add an exception for the player object. So, bullets can go through the player. This is the main way to go.
2- You can use layers (or Z depth) and you can create a whole layer for bullet spawner etc. And make enemies also have targets in that layer/depth.
I don't have Unity installed on my current system right now. But I will install it when I get a chance, and if you don't solve it until then I will try to help properly.

Unity Physics 2D disable bounciness [closed]

Closed. This question needs debugging details. It is not currently accepting answers.
Edit the question to include desired behavior, a specific problem or error, and the shortest code necessary to reproduce the problem. This will help others answer the question.
Closed 6 years ago.
Improve this question
I don't want reaction forces to bounce my pig to the side when it collides with a platform. Material bounciness = 0 for both platform and the pig
Anyone has an idea?
I wanted to ask before I dump physics2D and write my control mechanisms.
https://gfycat.com/GraciousHighKinkajou
You have to create a Physics2D Material and modify it to not have bounciness.
And then, apply that material to the collider of the object, in this case, the pig.
Turns out it was bug in my character controller script, had nothing to do with Unity. Thanks for understanding and answers :)

Why Isn't My 2D Box Collider Working? [closed]

Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 7 years ago.
Improve this question
i'm making boundaries for the characters in my 2d game in unity 5. I added box colliders to the borders and my characters but the characters don't stop when they run into the other borders.
I don't have much experience of Unity 5, but probably these things work similarly than with old versions of Unity.
Colliders can be used for stopping things to go inside each other without writing your own OnCollisionEnter function.
So there must be some other problem. Check that:
Colliders are same type. 2D and 3D colliders don't detect collisions with each other.
At least one participant of the collision needs to have rigidbody component attached.
Check that is trigger is not selected on any of the colliders
Pause the game and check in the scene view that the green boxes of the colliders actually colliding
Check the layers of the gameobjects and check if they are should collide because of the layer based collision
When the colliders intersect it will trigger an OnCollisionEnter event. You need to tell it what to do after that. It could be setting the velocity to 0 in the case of a ball hitting the wall, or it could be awakening enemies in the case of a player walking into a trap. You have to define the behavior.

Working with Particles as a Game Object [closed]

Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 7 years ago.
Improve this question
I am trying to make a Liquid in Unity that Can be worked with and have functions. I am trying to make something more like Pouring water from a bottle to an empty cup where the water in the Bottle Decreases and the cup start to have water. I tried working with particle system but I do not seem to have control of the particles itself like for example when a particle collide with another particle they form a bigger particle and when an Event happens other functions to apply to them.
The game intends to be for phone platforms. I will be working with pixels.
You are correct to use particles for the water pouring effect. However, to achieve the cup filling up with water you will have to use some trickery. The water itself will have to be a plane or cube which rises or grows in size at a set interval while water is pouring or when particles collide with it. Personally I would just do a set interval, especially since it's for mobile, as collision detection on that level is expensive.
There is no way to script a particle system on the individual particle level (or form new ones). Particles are meant to be emitted and destroyed as quickly as possible. Having them form a part of the permanent scene is not a viable option for performance reasons.