Hi everyone,
Not sure what the chances of this getting answered are since it isn’t necessarily in the course content but I’m trying to add my own modifications to this section and having a little trouble. I want to be able to shoot the object that the player is holding at a certain velocity. Similar to if you were to pick up an object and throw it. I’m having trouble figuring out how to implement this. I thought all I had to do would be to update the velocity of the object being held, release and then launch it in the direction the player is facing. However I can only find examples that show how to spawn objects and then delete them. However I want to throw existing objects that is currently being grabbed.
Here is the gist, the problem lies in void Shoot().
Thanks for any help in advance!
If anyone’s interested in a little bonus. Here’s a few minutes of the game as it is currently.