- Home /
2.5d game instantiate problem
Hello,
So, I am working on a 2.5d game and I'm trying to make the character drop grenades. The problem is that when I drop th grenade, it only drops left, so if I'm walking in right, it wil drop the grenade in the other side. How can I fix it? Cheers!
Answer by riordanw · Apr 20, 2011 at 08:50 PM
Try having a blank object as a child of your player object and position it in front of him were you want the grenade to appear. Then instantiate the grenade at its position. That way the grenade always spawns in front of your player object.
In short use a blank object in front of your player as a grenade spawn point.
Yes, I try that but I want to spawn the grenade in front or behind depending on the position of your player
you could have two spawn points or just instantiate at transform.position + offset where offset is a vector3 of how far in front or behind of the player you want the grenade to spawn
Your answer
![](https://koobas.hobune.stream/wayback/20220613124102im_/https://answers.unity.com/themes/thub/images/avi.jpg)
Follow this Question
Related Questions
The name 'Joystick' does not denote a valid type ('not found') 2 Answers
Instantiate GUI text 1 Answer
Terrain with lots of objects 1 Answer
cannon script is not working, no errors. 1 Answer
object count cap? 1 Answer