hi!
I’m trying to do something like the pitcture displays and for many reasons I’m avoiding to use rigidbodys and physics. There are also no character controllers attached to the player, just a sphere collider.
Assuming I control the hammer rotation with a simple input lef-right, I’m trying to stop the rotation of the hammer when it reach the pawn.
I had no trouble with planar moving and colliding (and whatever that matters with the plane), but with rotation and particularly with eccentric rotation I find some problems to get a collision.
I tried a controller based on triggers, but it does’t work well…
Okay, if you want to do this without rigidbodies and physics then using triggers sounds like a reasonable idea.
I presume you do your rotations in the update function, so adjust your rotation script to include this functionality:
However you might encounter a problem: without a rigidbody attatched to the hammer collision events probably will not fire. You can solve this by adding a rigidbody to your hammer, disabling gravity and set it to IsKinematic.
Oh, and don’t forget to add a “StopHammer” tag to your unfortunate guy who will endure the wrath of the hammer!
P.S: I seem to recognize this art style, are you by any chance working with MrSpeedWagon?
Thanks a lot! script works well and now we can proceed with our game (yes, I’m with mr-speedwagon)
since the collision doesn’t work with object rotating instead of translating, you think is possible to use a system based on triggers for achieve a physic-like collision system? (sorry for the dumbness)