Hi, i´m prototiping a 2d scroller character game and a I need to make a wheel rotate when the player shoots at it. Any idea ?
Thanks
Two ways come to mind.
- If you dont need the wheel to spin and stop in a precise way, you can use physics simulation and tick the checkbox that says damage events add impulse.
- if you do need precise starts stops and speed, Then on the wheel’s Hit event, you can use the Hit or Impact Location to see which side of the wheel was hit and how far from the center, how high/low or left/right from the wheel’s center it was, and use a timeline node or tick your own variables and/or use rotator lerps until it hits the desired rotation direction.
thank you so much!!
Let me know if that works!