- Home /
horse with rigid body and boxcollider wont collide with anything i tried mesh collider with and without convex , i tried box collider with and without rigid body.
i am building a project in unity which is horse show jumping , horse has a horse controller script and some other scripts , i have used SWS (simple way point systems) for some AI , now when i set up my bars for my horse to jump over it won't collide with anything. tried using collisionenter and freeze component but even then i need my horse to collide with something , so that i could see natural and physical change when it collides. p.s yes , i have used transform.position and yes i cant stop using it .............. now what solutions i can work with................ @aldonaletto @Bunny83 @fafase @Fattie @whydoidoit @qJake @clunk47
Answer by wildlo931 · Oct 10, 2017 at 05:01 AM
so when u use SWS (Simple waypoint Systems) it tends to use translate and transform.position kind of stuff that makes the character controller pass thru any collider except when its mesh collider non convex and its kinematic no other condition to my knowledge make the collision happen , it maybe possible to get collision on script but if the character passes through the collider u wont be able to entertain any scripting.............keeping in mind if the body collides a kinematic collider no physics will be applied. etc throwing of body due to momentum.
Since i had to use the SWS i did a little hack / trick u can say through scripting which made it look like that body collided and because of moment the body was thrown off.
void OnCollisionEnter(Collision other){
if(other.gameObject.tag == "hurdles")
{
other.gameObject.GetComponentInChildren<Rigidbody> ().isKinematic = false;
}
Answer by tormentoarmagedoom · Oct 09, 2017 at 08:40 AM
IS trigger?
is trigger is not on ........ neither on the horse nor on the bar ............. @tormentoarmagedoom