- Home /
Collision detections under specific conditions
Rather than ask for a specific solution, I'll explain my problem so you can have a better understanding of what it is I'm trying to do.
I have a very fast moving object that needs to collide with a wall. Attached to the moving object is a simple script that counts how long it's been colliding and deletes itself after this counter gets to a certain point.
I do NOT want to use raycasts as a replacement for a fast object because it needs to be visibly traveling through the air. I also need to determine how long its been going through another object.
Here's what my solution was: I made the object's rigidbody kinematic and removed the portion of the script that caused it to accelerate. I added a new script that holds a velocity in the form of a Vector3 and adds that velocity to the object's transform multiple times every frame. However, collision detection is not working, regardless of the artificial speed of the object. Is the rigidbody only checking for collisions once every frame instead of whenever it's moved? Will it not check for collisions if the rigidbody component doesn't contain a velocity of it's own? Is there a more simple solution that I'm missing? Any help is appreciated.