Ambiera ForumDiscussions, Help and Support. |
|
|
|||||
|
hello how can i add grenades to my fps game can any one point me in to the rigt direction |
||||
|
hmmm now this is a good question.... i don't know it will work or not...but you can script something using the physics... just like a jump of an object.. instead of making the jump length smaller... you can make it longer.... so that when a key pressed you can get a good parabolic animation of a grenade throw... you may also need to attach move object using physics behaviour and then use the action on impact property to make explosion/damage... also you have physics engine enabled for the target you are working on... and am not completely sure if this will work, i have never implemented something like this before... it is just an an idea... it may work or maybe not work... |
||||
|
wrote: hmmm now this is a good question.... i don't know it will work or not...but you can script something using the physics... just like a jump of an object.. instead of making the jump length smaller... you can make it longer.... so that when a key pressed you can get a good parabolic animation of a grenade throw... you may also need to attach move object using physics behaviour and then use the action on impact property to make explosion/damage... also you have physics engine enabled for the target you are working on... and am not completely sure if this will work, i have never implemented something like this before... it is just an an idea... it may work or maybe not work... If you are right, your answer would be so helpful for me... |
||||
|
Thank you for your response but im using the android target and it only supports simple physics is there a way to edit the down curve of the bullet? |
||||
|
I don't know if the above method will work on android target or not...if you wanted to acheive something like this... You have to scheck and change position by a vector every few seconds... So that it looks like a parbola... For example you want to throw a grenade about 30 meters aways from you... Then on executing the action you have to script change position of the grenade scennode every few seconds... You can script the position change according to your direction if it is 30 meters than you can increase the 'y' position by 1 and the direction in which the grenade should be thrown either "x" or "z" suppose we are throwing it in "z" direction then... We should change "y" and "z" by 1 untill the grenade reach 15 meters and after reaching 15 meters we have to decrease "y" and "z" by 1 untill the grenade reaches 30 meters... This will give the parabolic curve ... And then we can execute thw explosion.... I know it sounds very complicated... And it is also just an idea i have never implemented such thing... Hope you understand what am saying and hope it worka for you.. |
||||
|
thet does soud complicated but ill give it a try thank you for yor help and i got another question how do i make ricochet bullets |
||||
|
You can use action on impact in the shooting behaviour... Maybe that can help you in creating ricochet bullets... Or am not the right person to answer ur concern about ricochet bullets... |
||||
|
thank you for your help and time Mahalo. |
|