My player has multiple hearts, and i want to damage him one heart for every collision with an ennemy, but after each collision i want him to be invulnerable for a certain amout of time, and making him able to pass through the ennemy, thought about disabling his BoxCollider2D for a moment but that makes him fall through the ground as i'm using a Rigibody2D, how can i achieve that ?
Unity2D disable player collision with ennemy when taking damage
305 Views Asked by Milorn Ovivias At
1
There are 1 best solutions below
Related Questions in UNITY-GAME-ENGINE
- Using arrow keys to rotate an object
- know object behind another object is fully visible
- Unity3d AudioSource not creatable
- Unity3d - Input.GetKey returns true more than once
- Flurry Ads on Unity3D with Prime31 plugin
- Make screenshot of DirectX window that is hidden and doesn't have focus
- Coroutine being detected as inactive despite being active
- Unity3D: Adding charged force in relation to position
- Unity - Particles emitting non-random
- 3d mouse aim camera 3rd person vertical C#
- Unity: How would I go about creating a power up system?
- Unity - Gui Button issues (Android)
- Unity3d strange Collider behaviour
- Start() function doesn't work properly after Application.LoadLevel
- Gravity works weird
Related Questions in 2D
- Algorithm for drawing tiles on screen
- Object doesn't moving well in rotation
- Cocos2d : Shooting a ball in the direction of the mouse click/Touch
- Error: cannot convert 'int (*)[3]' to 'int (*)[100]' for argument '1' to 'void repl(int (*)[100], int, int)'
- How to add a string to a 2D array in C
- Fitting 2D sum of gaussians, scipy.optimise.leastsq (Ans: Use curve_fit!)
- Java 2D game random rectangles
- 2D perspective transform in JavaScript
- List of 2D Arrays with numpy
- Make two physics objects not collide but do detect collisions in Unity
- Index of an array from a 2d np.array in Python?
- Generate 2D grid with alternation probability
- how to add Scoring to unity3D 2d top down car game?
- Blurring in PyGame
- Destroy Gameobject according to distance value
Related Questions in COLLIDER
- Unity: Raycast in Editor Mode does not work
- How to check if there is a collider(gameobject) on the position or not
- Adding a PolygonCollider2D makes Unity instantly crash
- Moving GameObject without transform.position through a touchscreen? (In Unity3d)
- Not destroying objects fast enough and causing another collision
- Unity2D disable player collision with ennemy when taking damage
- Unity: more than one collider with different functionality in the same game object
- Unity OnCollisionEnter function not registering
- A ball (character) falls in Unity 3D
- 2D Colliders not colliding [Unity - C#]
- Why are the physical and visual speeds of my custom wheel collider different?
- Colliding 2 times with the same object
- attempting to pick up Object in unity is invisible but collider box can be seen
- Mesh collider doesnt follow the body
- Only use 1 collider of my gameobject when using OnCollisionEnter2D() Unity 2D
Trending Questions
- UIImageView Frame Doesn't Reflect Constraints
- Is it possible to use adb commands to click on a view by finding its ID?
- How to create a new web character symbol recognizable by html/javascript?
- Why isn't my CSS3 animation smooth in Google Chrome (but very smooth on other browsers)?
- Heap Gives Page Fault
- Connect ffmpeg to Visual Studio 2008
- Both Object- and ValueAnimator jumps when Duration is set above API LvL 24
- How to avoid default initialization of objects in std::vector?
- second argument of the command line arguments in a format other than char** argv or char* argv[]
- How to improve efficiency of algorithm which generates next lexicographic permutation?
- Navigating to the another actvity app getting crash in android
- How to read the particular message format in android and store in sqlite database?
- Resetting inventory status after order is cancelled
- Efficiently compute powers of X in SSE/AVX
- Insert into an external database using ajax and php : POST 500 (Internal Server Error)
Popular Questions
- How do I undo the most recent local commits in Git?
- How can I remove a specific item from an array in JavaScript?
- How do I delete a Git branch locally and remotely?
- Find all files containing a specific text (string) on Linux?
- How do I revert a Git repository to a previous commit?
- How do I create an HTML button that acts like a link?
- How do I check out a remote Git branch?
- How do I force "git pull" to overwrite local files?
- How do I list all files of a directory?
- How to check whether a string contains a substring in JavaScript?
- How do I redirect to another webpage?
- How can I iterate over rows in a Pandas DataFrame?
- How do I convert a String to an int in Java?
- Does Python have a string 'contains' substring method?
- How do I check if a string contains a specific word?
There is two ways to do this:
1-https://docs.unity3d.com/ScriptReference/Physics.IgnoreCollision.html
2-https://docs.unity3d.com/Manual/LayerBasedCollision.html (You will change layers for a short period of time)