Box Collider rotating incorrectly
I have a box collider and a rigidbody attached to a model see saw object, The player jumps on the left side and I want it to rotate along one axis and then another object will fall onto the other side which should rotate it in the opposite direction. yet the box collider attached to the paddle does not rotate correctly with the paddle please see images for a better description and closer look.
Answer by brirai · Mar 20, 2016 at 03:14 PM
thanks for replying dude it's very much appreciated Unfortunately I could get access to my computer from when I posted the question but I sadly said I'd watch a sports game whilst doing so I was browsing forums for similar issues. I never came across it before posting though. I was reading through another issue about scaling issues with maya models in unity and was looking into that when I realised that my models had similar issues. Because I was scaling the seesaw in editor it was affecting the box collider for some reason, once I reset the objects scale to 1,1,1 and then increased the import scale factor the box collider worked as it should.
Answer by MacroNerd · Mar 18, 2016 at 09:41 PM
Try checking "Is Trgger" in the box collider and use a script like:
void OnTriggerEnter(collider other){
if(other.gameobject.comparetag("collider tag")){
transform.rotate(new Vector3(x,x,x);
}
}
this will be buggy and may not work. You'll have to set the vector 3 parameters also.
Your answer
Follow this Question
Related Questions
Collision Detection doesn't work on sides of the object? Half Collision? 0 Answers
How to make box collider align with mesh during rotation? 0 Answers
how can i connect box collider to each other to have smooth surface 0 Answers
HELP! How to fix player bumping into the wall? 0 Answers
Box Collider Too Small after Unity 5.6 Update(unable to adjust) 1 Answer