Unity
I create two collider effects and want them can have some function while them collider each other . but i don't know how to make two particle collider.
How to make fire and water can collider each and fire will be put out by water.
Thank for help!!!!
From the documentation (http://docs.unity3d.com/Manual/PartSysCollisionModule.html)
Send Collision Messages : Check this to be able to detect particle
collisions from scripts by the OnParticleCollision function.
Be careful though. Overdoing collisions and particles is a good way to get performance issues
Be sure to follow the tutorials for particle systems too!
https://unity3d.com/learn/tutorials/topics/graphics/particle-system
Thats the best I can currently do, given you have not supplied any work we can comment on.
The unity particle system can collide with colliders(objects) in the scene if collision is enebled for particle system.
But particle systems do not collide with each other. Particles have no volume, so it's not really possible.
You cannot use built-in particle system for fire and water and have them collide with each other. However, you can create a custom particle system using actual objects having colliders which can work as you expect.
Related
hi i was making a multiplayer game where at some point the bullet was colliding with the sender and i don't want that. It keeps making glitches and the bullet keeps floating. I even tried reducing the player box collider but its still getting stuck. if i disable collision detection for the player and the bullet, the multiplayer version will be affected and players won't be dying
Please help
tried to reduce the player collider but when the bullet is shot on y axis its getting stuck
Since you're doing a multiplayer game, On the client side you could change the player's object layer to something unique. In my case here, I've added a new layer called Player and I'm instantiating my player on a layer called Enemy by default. I'm also putting my bullets on a layer called Bullet.
Make sure you only change the layer from Enemy to Player on the client side at runtime and for your client's player object only.
Then you can go into Edit/Project Settings/Physics and scroll down to the bottom until you find a collision truth table.
Then ensure that you uncheck the collisions between your player's layer and bullet's layer.
I'm currently making a simulation where disks are placed in a conveyor belt and sorted by color. When the sensor detects a white disk, a rectangular object 'pushes' out of the conveyor belt into a box, and it needs to move quickly. However, whenever we set the speed to a high number it just goes through the disks, without pushing them. I have already tried making the pushing object's collision detection 'Continuous dynamic' (RigidBody) and the disks' collision detection 'Continuous' (like in this video: https://www.youtube.com/watch?v=XvrFQJ3n8Mo). I have attached an image of how the mentioned part of the robot looks and the settings for both the disk and pusher object.
disk and pusher object settings
visualisation of robot simulation
Your problem has been solved HERE , in short it is because only convex mesh colliders can collide with each other. (Your right one is convex and the left one is not).
Hi, as you can see from the above image, my player sinks into my platform. This is because
the platform isn't a flat surface. How do I stop the player from sinking into my platform?
So far I have tried to use layers, but I don't think this works for 3D objects. This is my first time creating a 3D game.
UPDATE: I've added colliders to both objects, but it still sinks.
Probably collider shape/placement. Possible reasons:
one or more colliders are not the shape you think they are. (click edit collider on its component to visualize
one or more colliders is set to isTrigger.
Concave generated mesh colliders can have unexpected results.
I'm currently developing a game with unity3d (2019.3 version).
My problem actually, is that I don't know how to make two colliders don't collide with each other, but still be able to interact.
Okay, let's have an example.
Let's say that I have a zombie and a player, I want the player going through the zombie, but i want the collider of the player able of being detected by the one on the zombie, so the the zombie can attack the player, same for the bullets that the player shoot on the player. (little precision, the zombie attack the player thanks to a trigger collider in front of him).
I've already tried to modify things in the layer collision matrix, but the player and zombie aren't able to interact. So that's not good.
If you want the colliders to detect eachother but not collide then you should probably set one of the colliders to be a trigger.
Just check the Is Trigger checkbox and that should help you achieve the desired result.
I am currently working in a Unity 3D project (in version 5.0.1 to be precise) in which the character can walk in different-shaped planets without falling. So it is always attracted by the planets gravity (similar mechanic to the Super Mario Galaxy games).
Now, the problem is when I try to code the AI for the enemies. This AI should be pretty much simple, but because of this thing that I have with the planets shapes, I haven't been able to come up with a solution. The enemy should check where the player is and move ahead to its position. It's a really dumb enemy. But the thing is, that the enemy must be able to track the player and get to its position no matter what planet he is in. So, if the planet is circular, I cannot make the enemy look at the player and then move forward, as I would do in a plane planet.
I have already tried using a NavMesh, but Unity doesn't want to collaborate and ends up making a NavMesh of 1/3 of the planet. I don't understand why. I have tried changing every single parameter of the NavMesh baking but I haven't succeeded.
Another problem that I would like to do is: ¿How would you make a player be able to walk on the surface of any planet, no matter what its shape, in a smooth way while using a Mesh Collider? I am currently achieving this by getting the planet's normal with a raycast, rotating the player so that the Y axis is perpendicular to the normal and applying a force in -Y to simulate gravity. But this brings lots of problems when I implement the Mesh Collider. It results in a jittery effect. But, when I use a primitive collider from Unity, it works fine...
Anyway. What I need the most now is the answer to the AI question. The other one is kinda like a plus.
P.S: It doesn't matter if the solution is in Javascript. I can then translate it to C# :)