- Home /
Hitting Collider,Not Being Effected ?
Hello guys, i have a problem. I have a parachute system,actually it's more like an airplane system,anyway i want to shake a little bit and tint the screen to the red a bit if i hit to the buildings in the city. BUT , right now i won't deal with tint, my problem is when i collide with the mesh collider of the building the screen gets crazy and i can't get the control back , what should i do not to be effected from colliding ? ( But the problem, I also need to be effected for little shaking )
I also thought that i can ignore all the colliders and do sumthing like that :
var distance : float = 1000;
function Update()
{
var building = GameObject.FindWithTag("City1");
if(Vector3.Distance(transform.position,building.transform.position) < distance )
{
Add force or sumthing
}
}
but when i do it like this, first building is OK but the function doesn't work on other buildings,please help :)
Answer by Mirhous · May 19, 2011 at 11:12 PM
What do you mean by "The system gets crazy"?? Assuming that the collision dont wok properly and your character simply goes inside the buildings mesh I would say for you to check:
The collision only happens if at least one side has a rigidbody/charcontroller component.
Look if one or more of the colliders involved are "triggers".
About your posted code, the problem is probably the tag you chose for finding the GO. Take a look in all the building's tags.
Hope it helped...
I meant that I lost control, the screen starts rotating it's like plane is falling down but i can't take the control back, it's being effected by the rigidbody. Also the tags are O$$anonymous$$,there is gotta be something else.
Your answer
![](https://koobas.hobune.stream/wayback/20220612081114im_/https://answers.unity.com/themes/thub/images/avi.jpg)
Follow this Question
Related Questions
Using character controller insted of normal collider 0 Answers
what force did collider collide with? 4 Answers
Applying colliders on Bike. 3 Answers
count how much force is applied 0 Answers
how create a explode force collider 2 Answers