contacts.normal question
Hi there, I'm trying to check contact point normals when a collisions occur. I basically have an if statement that checks if the contacts.normal.y is not equal to zero. The problem is whether the...
View ArticleOnTrigger AI projectile detection and turn.
Ok I need to get my AI to notice bullets being shot into his line of sight and him. He has 2 colliders, one is a trigger which is the vision collider and the other is the capsule collider on the AI...
View ArticleMake something happen when touch cube C#
I am very new to C# and scripting in general. How would I make something happen when one object touches another object instead of just instantly?
View ArticleRead / Write to phone's contact list.
Hi there I've been asked to firstly: 1. Read the list of contacts on a device. 2. Add contacts to the device's list. Does anyone have any idea on how this may be achieved with Unity?
View ArticleOnCollisionStay contactPoint2D problem
I'm trying to figure out where my character is while he's colliding with an object by using the contactPoint but it seems like contactPoint is calculated only once ![alt text][1] [1]:...
View Articlecontact.normal not updating in OnCollisionStay2D
I'm trying to apply a force to a ball-like object that is parallel to the surface that it is currently contacting. I'm doing this by getting the normal of the contact point, then taking the cross...
View ArticleTrigger single collision event
For my game, I have multiple game objects for all of those I attached single collision detection script. When object collides with other object two OnCollisionEnter method executed because each object...
View ArticleWrong ContactPoint position when modifying velocity
I'm working on a game where we have spaceships, and they can behave in two different ways when it comes to applying forces. **Space:** We apply a force in the local forward direction. It pushes the...
View ArticleHow to specify two game objects are in contact in 2D?
I am trying to add physics to a bike object with hindge joints connected to wheels now i need to add force on back wheel when i press up button this should happen only when bike is in contact with...
View ArticleReturned string values of thisCollider.name and otherCollider.name swap
The returned string values of thisCollider.name and otherCollider.name swap with each other in a seemingly random and inconsistent manner. I have a simple set up. I have a character that consists of a...
View ArticleHow do I get a collision's contact normal without using any non-kinematic...
I want to have a ball bounce off of different surfaces (static colliders and a couple of kinematic rigidbodies) without using actual rigidbody physics. The only problem is that OnTriggerEnter gives you...
View ArticleHow do I find the point of contact on a box collider?
I'm performing a little bit of simple practice in unity. As a start I'm trying to recreate pong as a start. But I ran into a little problem, what I want to do is have the ball go in a certain direction...
View ArticleOnCollisionStay2D - why is the list of contacts is incomplete?
Hey all, Here is my code: void OnCollisionStay2D (Collision2D col) { for (int i = 0; i < col.contacts.Length; i++) { ... blah blah ... Debug.DrawRay(p1,a1,Color.white); print ("Ima colliding"); } }...
View ArticleHow to use Best of contactPoints2d
i am new, advanced thanks for help, i want to ask question that i am developing a game like a spider man when we throw a rope to any collider then i want that rope will be attached with hingejoint2d...
View ArticleCursor to move through a moving wire
I am creating a scene with power transmission lines. Between each two poles, wires are hanging. Each wire has physics properties. That is a wire moves regarding the wind and also the objects which...
View ArticlePoint on mesh
i am making a unit, represented as unittransform, that considers any nearby mesh, concave or convex (probably separated into different pieces and different tags) And then goes through all of its...
View ArticleHow can i get Contact Force?
Hey, The question is simple. Is there a way to getting contact force ? I tried to use getting velocity in OnCollisionEnter method. But it's giving velocity after the contact.
View ArticleHow to contact a developer in the asset store?
Hello, It may sound like a noobs question... HOW DO I CONTACT THE DEVELOPER OF A THING I BOUGHT ON THE ASSET STORE? It's frustrating... i can't find any contact button. Please help me. Thank you, Ethan.
View ArticleBullet not destroying on contact
using UnityEngine; using System.Collections; public class Bullet : MonoBehaviour { public int moveSpeed = 220; public Transform explosionPrefab; // Update is called once per frame void Update() {...
View ArticleHow to open an internal file .vcf in C # to iPhone?
I need to open a vCard(.vcf) file that I previously stored on the device. Using Application.OpenURL I can not do it. Can someone help me?
View ArticleMobile--Create Contact From App
I need a way to create a contact- or prompt to create a new contact with certain information. For example, if there is a phone number or an email, I want to be able to click on it and it will redirect...
View ArticleIs there any way to find the mesh triangles which are colliding with another...
I'm working on a task which requires me to highlight the perimeter of collision and the perimeter will change according the collision depth. For that I need to find the mesh triangles which are...
View ArticleMaking contact joints less stiff.
Both the OpenDE engine and the Bullet Physics engine use the concept of ERP and CFM. - Error Reduction Parameter Constraint - Force Mixing This can be used on contacts, and other constraints, and makes...
View ArticleNormal of collision hit is moving downwards
I have a tank that is supposed to bounce with Unity´s reflect function. What I do, is that I check the collision contact, throw a raycast to that position and get the normal of the collider I hit, so...
View ArticleHow is the default value of ContactFilter2D.isFiltering true?
I have a static ContactFilter2D like so protected static ContactFilter2D contact_filter; protected float self_destruct_timer; protected Vector3 direction; private float xward; protected virtual void...
View ArticleFind nearest contact point inside trigger
I have a sphere collider trigger and i need to find the closest contact point on various other colliders. - I've tried using "ClosestPointOnBounds" but have [read here][1] that the reason this isn't...
View ArticleDraw on area of contact
I have an object that goes through walls. however, just making it clip through it looks weird, so I want to add a black circle around the area where the object and the wall collide ![alt text][1] [1]:...
View ArticleWeird Contact Shadows in HDRP
Hi, I've just switched from UWRP to HDRP after finishing a couple of games with it but I've been experiencing a weird issue that contact shadows look weird. See the image below. How can I fix this?...
View ArticleCasting to detect collision includes trigger colliders
I am using a custom platformer physics script from a tutorial https://learn.unity.com/tutorial/live-session-2d-platformer-character-controller For my game, the player has a melee attack, and I figured...
View Article