Throw a rock

How do I get my character to throw a rock. Ive got the rock on a hidden layer, and I have an edit object actuator setup and adding the object. Unfortunatly it just adds it in one long row off to the side. How do I get it to be thrown from the character? Im not worried about complex curves or anything like that for now. Just a straight line 100 units away. If anyone knows of any tutorials I could search for I will figure it out myself but so far my searches have returned projects too unique for me to understand my application.

I also tried the blender gamekit reference to Squish the Bunny rockets. Again, the application just wasnt the same because the rocket already existed.

You need (well, not realy NEED, but that is how i do it) the actuator on an empty that is parented to your player.

I will try this. thanks.

If I do this, when the player moves so does the rock in mid-air.

give the rock some default velocity then make the empty add the rock when you push a button. as soon as the rock spawns it will already have the force and will in ensence be thrown by the player.

Thank you. That was it. Now i’m not sure how to kill the rock when it hits something such as a wall or the player?

add a property like “wall” (any name you want really) to what ever object you would like the rock to disappear when it hits then add a collision sensor to the rock with the property wall with an end object. when it hits anything with a wall property applied the rock will disappear.

Hmmm…Still doesn’t seem to work. This is probaby the oldest question in the book and I am drawing it out to be to longest post at elysiun.

i think what digitalSlav means is add a property to the thing that will make the rock dissapear, named -anything-
add a colision sensor to the rock (collision property, same as the one you added to the wall.

Odd. The faces on my player (cube) were not responding to the collision. They were set and facing correctly. I wonder what it was? Oh well replaced the cube and it works fine now.

sometime thin objects dont seem to work. i’ve even had to make plane walls with thick cubes to help collision. think it’s related to frame rate someone posted a while back.