Objects going through other Objects!

The problem is simple, I have this car and for whatever reason I can drive through doorways and stuff, there is some resistance but it still allows the player to go right through doorways in the car. Here are 3 pictures that show the car just somehow able to go right through the doorway:



Bump

What kind of colliders does your building have?
Why is your car marked as static? You are telling unity that your car won’t move :wink:

Idk why its marked as static, it has a Photon View attached to it, capturing its transform maybe this is causing this because it is not static when I do not have the game started.

The building is using a Mesh Collider (Not convex)

How does your car move?

A very simple script, so no prob giving it:

public var speed : float = 30; //speed of the car, tweek as needed based on your scale
public var turnSpeed : float = 100; //turn speed
public var Gravity : float = -6;

function Update()
{
       //Apply Gravity
	rigidbody.AddForce(new Vector3(0,Gravity,0));
    //grab the input axes
    var steer=Input.GetAxis("Horizontal");
    var gas=Input.GetAxis("Vertical");
 
    //if they're hittin' the gas...
    if (gas!=0)
    {
        //take the throttle level (with keyboard, generally +1 if up, -1 if down)
        //  and multiply by speed and the timestep to get the distance moved this frame
        var moveDist=gas*speed*Time.deltaTime;
 
        //now the turn amount, similar drill, just turnSpeed instead of speed
        //   we multiply in gas as well, which properly reverses the steering when going 
        //   backwards, and scales the turn amount with the speed
        var turnAngle=steer * turnSpeed * Time.deltaTime * gas;
 
        //now apply 'em, starting with the turn
        transform.rotation.eulerAngles.y+=turnAngle;
 
        //and now move forward by moveVect
        transform.Translate(Vector3.forward*moveDist);
    }
	if(Input.GetKeyDown("g")) {
	}
}

It’s actually not my script, I am using it until I develop my own but right now it was just for testing.

(Only thing there of mine is the gravity system)

Bump

Well, try disabling your photon view and see if it is still static, if not, try again if you can drive through your wall.

Getting rid of Photon View doesnt make it un-Static, when I do manually make it unstatic in-game it can still go through wall

Do you have a rigidbody ?

yes its controlled wth rigidbody