Making a bat
daniel.robert.campbell
Member Posts: 251
I'm having some trouble making a "bat" in my game. I have a ball, and I want the player to be able to swing a bat at it. But I am having trouble getting the bat to react the way I want it to. Details of what I WANT the bat to do are below. Any advice you could give would be awesome. Thanks!
Basically the bat sits horizontally when idle. I want the player to push a button or key and that will cause the bat to draw back to a vertical angle. The rotation pivot should be on the handle (which I don't know how to do). After releasing the button the bat should swing forward at a greater speed than it drew back. It would also be nice if the bat swung through. Meaning that it swings past the perfectly horizontal mark by a few degrees before moving back to the idle position.
Again, any guidance people could give me would be greatly appreciated. /hug.
Basically the bat sits horizontally when idle. I want the player to push a button or key and that will cause the bat to draw back to a vertical angle. The rotation pivot should be on the handle (which I don't know how to do). After releasing the button the bat should swing forward at a greater speed than it drew back. It would also be nice if the bat swung through. Meaning that it swings past the perfectly horizontal mark by a few degrees before moving back to the idle position.
Again, any guidance people could give me would be greatly appreciated. /hug.
Comments
Add wings.
Tada!
On a perhaps more helpful note, a good starting point may be the pinball template which you can find on this site.
The 'flippers' would behave in a reasonably similar way.
If that doesn't help, then I'm sure some math whiz will come along and lend a hand!
Good luck!
QS
Dr. Sam Beckett never returned home...
Twitter: https://twitter.com/Quantum_Sheep
Web: https://quantumsheep.itch.io
or make an actor twice as long as the bat and in photoshop make an image that is half bat half clear. The just use the rotate to position or angle behavior.
Hah
Better understanding at Attributes??