Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

3 Dimensional Chat / [SOLVED] detect ammunition with linepick detection (method concept)

Author
Message
Santiago3D
3
Years of Service
User Offline
Joined: 11th May 2020
Location: Argentina
Posted: 18th May 2020 21:35
Hello, I managed to make my plane fly, and to fire ammunition (type).

I before, to calculate the collision of the ammunition towards the following.

1. Activated the "entitypickmode" of the objects that could be victims of that ammunition.
2. I threw a lightning bolt (linepick) from my ammunition, towards the future position of the ammunition.
3. if the ray detected collision on an entity, then it had my collision with its position through pickedx () pickedy () and pickedz ()
4. I deactivated all objects that could have entitypickmode activated, to have my resources clean.

My ammunition collides with LOWPOLY objects representing each unit.

I clarify that I write my own physics for collisions and movements since I am not yet familiar with AppGameKit physics.

Question
---------------

As I am new, I want to know how in AppGameKit I should approach this issue.

I am reviewing the help, and since I am not familiar with all the options that agk offers, I wanted to ask you what is the recommended way for collisions of this type.

in case of ammo and proyectiles, i don't like use physics collisions becaus the highspeed generate some problems, so linepick method is the best option in this case.


the screenshot of the game, i want to shoot the carrier

The author of this post has marked a post as an answer.

Go to answer

blink0k
Moderator
11
Years of Service
User Offline
Joined: 22nd Feb 2013
Location: the land of oz
Posted: 18th May 2020 21:43 Edited at: 18th May 2020 21:43
This post has been marked by the post author as the answer.
I would use ObjectRayCast()
Have i look at the example posted with the help for guidance
Santiago3D
3
Years of Service
User Offline
Joined: 11th May 2020
Location: Argentina
Posted: 18th May 2020 23:51
Thanks you BlinkOk!!! is exelent example...

Login to post a reply

Server time is: 2024-03-29 08:42:04
Your offset time is: 2024-03-29 08:42:04