Ambiera Forum

Discussions, Help and Support.

Ambiera Forum > CopperCube > Help with CopperCube
grenades

neo96732
Guest
Quote
2018-08-15 21:52:53

hello how can i add grenades to my fps game can any one point me in to the rigt direction


just_in_case
Moderator
Quote
2018-08-16 05:15:22

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...


behroz-khan
Registered User
Quote
2018-08-16 15:32:57

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...


neo96732
Guest
Quote
2018-08-19 19:56:18

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?


just_in_case
Moderator
Quote
2018-08-20 18:14:38

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..


neo96732
Guest
Quote
2018-08-21 02:34:03

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


just_in_case
Moderator
Quote
2018-08-21 03:03:14

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...


neo96732
Guest
Quote
2018-08-27 07:31:30

thank you for your help and time

Mahalo.


Create reply:


Posted by: (you are not logged in)


Enter the missing letter in: "Internationa?" (you are not logged in)


Text:

 

  

Possible Codes


Feature Code
Link [url] www.example.com [/url]
Bold [b]bold text[/b]
Image [img]http://www.example.com/image.jpg[/img]
Quote [quote]quoted text[/quote]
Code [code]source code[/code]

Emoticons


   






Copyright© Ambiera e.U. all rights reserved.
Privacy Policy | Terms and Conditions | Imprint | Contact