SA-MP Forums

Go Back   SA-MP Forums > SA-MP Scripting and Plugins > Filterscripts > Includes

Reply
 
Thread Tools Display Modes
Old 21/03/2017, 03:38 AM   #21
AndySedeyn
High-roller
 
AndySedeyn's Avatar
 
Join Date: Feb 2014
Location: Belgium
Posts: 1,354
Reputation: 681
Default Re: projectile.inc - PeppeAC's physics modified and simpler version

Are the objects in your examples supposed to hold the same altitude while they move? They also don't seem to react to objects with which they collide.
AndySedeyn is offline   Reply With Quote
Old 21/03/2017, 03:22 PM   #22
Gammix
High-roller
 
Gammix's Avatar
 
Join Date: Jan 2015
Location: Ottawa, Canada
Posts: 1,565
Reputation: 597
Default Re: projectile.inc - PeppeAC's physics modified and simpler version

Quote:
Originally Posted by AndySedeyn View Post
Are the objects in your examples supposed to hold the same altitude while they move? They also don't seem to react to objects with which they collide.
Altitude is varying, 2 CA_RayCastLine are used to calculate the maximum and minimum Z the object can reach.

By object reaction, you mean simulation to simulation response? If so no there is no simulation to simulation reaction yet but can be added in future version.
__________________

Howz it going?!


Gammix is online now   Reply With Quote
Old 21/03/2017, 03:32 PM   #23
AndySedeyn
High-roller
 
AndySedeyn's Avatar
 
Join Date: Feb 2014
Location: Belgium
Posts: 1,354
Reputation: 681
Default Re: projectile.inc - PeppeAC's physics modified and simpler version

The Z position of the object doesn't change - It slides to its end position in mid-air: http://i.imgur.com/HHUBROq.png
I understand that collisions with the projectile and the CA map are done internally, right? Objects don't simulate collisions yet?
AndySedeyn is offline   Reply With Quote
Old 21/03/2017, 03:50 PM   #24
Gammix
High-roller
 
Gammix's Avatar
 
Join Date: Jan 2015
Location: Ottawa, Canada
Posts: 1,565
Reputation: 597
Default Re: projectile.inc - PeppeAC's physics modified and simpler version

Quote:
Originally Posted by AndySedeyn View Post
The Z position of the object doesn't change - It slides to its end position in mid-air: http://i.imgur.com/HHUBROq.png
I understand that collisions with the projectile and the CA map are done internally, right? Objects don't simulate collisions yet?
http://i.imgur.com/qicFj3V.jpg
I tested the example and my objects are staying at ground after collision.

There's no collisions with projectiles, so if you throw a deagle and another deagle at the same time from opposite direction, they won't collide but go straight to their respective path. (and all these checks are done internally you just need to throw the deagle!)

What i can think of in your case might be player collision which might bug, did you throw the object very close to a wall?

Edit: or maybe you have a big "sphere_radius" set in Projectile function?
__________________

Howz it going?!


Gammix is online now   Reply With Quote
Old 21/03/2017, 03:58 PM   #25
AndySedeyn
High-roller
 
AndySedeyn's Avatar
 
Join Date: Feb 2014
Location: Belgium
Posts: 1,354
Reputation: 681
Default Re: projectile.inc - PeppeAC's physics modified and simpler version

Quote:
Originally Posted by Gammix View Post
http://i.imgur.com/qicFj3V.jpg
I tested the example and my objects are staying at ground after collision.

There's no collisions with projectiles, so if you throw a deagle and another deagle at the same time from opposite direction, they won't collide but go straight to their respective path.

What i can think of in your case might be player collision which might bug, did you throw the object very close to a wall?
I threw the deagle right in front of Jefferson motel in the middle of the street, so I guess not. To further test this, I drove to LV to test it in the middle of nowhere and same results - it just slides to its destination in mid-air.

And I meant collisions with walls and such, because that isn't working either.

EDIT: I took the example from your GitHub and didn't change anything. The code is loaded in as a filterscript.
AndySedeyn is offline   Reply With Quote
Old 21/03/2017, 04:05 PM   #26
Gammix
High-roller
 
Gammix's Avatar
 
Join Date: Jan 2015
Location: Ottawa, Canada
Posts: 1,565
Reputation: 597
Default Re: projectile.inc - PeppeAC's physics modified and simpler version

Quote:
Originally Posted by AndySedeyn View Post
I threw the deagle right in front of Jefferson motel in the middle of the street, so I guess not. To further test this, I drove to LV to test it in the middle of nowhere and same results - it just slides to its destination in mid-air.

And I meant collisions with walls and such, because that isn't working either.

EDIT: I took the example from your GitHub and didn't change anything. The code is loaded in as a filterscript.
Maybe you don't have cadb in scriptfiles? I know thats a stupid question but sometimes you might forgot to add it...
Cause that can be the only reason why collisions are not working, due to unsuccessful loading of collision data.

Try it in a gamemode, edit "OnFilterScriptInit" to "main".
__________________

Howz it going?!


Gammix is online now   Reply With Quote
Old 21/03/2017, 04:15 PM   #27
AndySedeyn
High-roller
 
AndySedeyn's Avatar
 
Join Date: Feb 2014
Location: Belgium
Posts: 1,354
Reputation: 681
Default Re: projectile.inc - PeppeAC's physics modified and simpler version

Quote:
Originally Posted by Gammix View Post
Maybe you don't have cadb in scriptfiles? I know thats a stupid question but sometimes you might forgot to add it...
Cause that can be the only reason why collisions are not working, due to unsuccessful loading of collision data.
I had it, but I didn't know it had to be called 'colandreas.cadb'. I didn't see the console print where it said that I was missing the data. My bad. Thanks for the support.

Nice include, very easy to use.
AndySedeyn is offline   Reply With Quote
Old 21/03/2017, 04:25 PM   #28
Gammix
High-roller
 
Gammix's Avatar
 
Join Date: Jan 2015
Location: Ottawa, Canada
Posts: 1,565
Reputation: 597
Default Re: projectile.inc - PeppeAC's physics modified and simpler version

Quote:
Originally Posted by AndySedeyn View Post
I had it, but I didn't know it had to be called 'colandreas.cadb'. I didn't see the console print where it said that I was missing the data. My bad. Thanks for the support.

Nice include, very easy to use.
Thanks and you can also apply rotation to deagle to make it look better plus decrease the sphere_radius a bit so it sticks to the ground.
__________________

Howz it going?!


Gammix is online now   Reply With Quote
Old 22/03/2017, 06:06 PM   #29
Gammix
High-roller
 
Gammix's Avatar
 
Join Date: Jan 2015
Location: Ottawa, Canada
Posts: 1,565
Reputation: 597
Default Re: projectile.inc - PeppeAC's physics modified and simpler version

Update v1.3.3:
- Gravity effect introduced (action = reaction), this was responsible for no bouncing before.
- Modified default param values in "Projectile" so the setting is now set for a ball like object nature.

Known bug:
- Sometimes the object goes under footpaths while sliding which cause the object to float and it never calls OnProjectileStop.
__________________

Howz it going?!


Gammix is online now   Reply With Quote
Old 22/03/2017, 06:46 PM   #30
AndySedeyn
High-roller
 
AndySedeyn's Avatar
 
Join Date: Feb 2014
Location: Belgium
Posts: 1,354
Reputation: 681
Default Re: projectile.inc - PeppeAC's physics modified and simpler version

Quote:
Originally Posted by Gammix View Post
Update v1.3.3:
- Gravity effect introduced (action = reaction), this was responsible for no bouncing before.
- Modified default param values in "Projectile" so the setting is now set for a ball like object nature.

Known bug:
- Sometimes the object goes under footpaths while sliding which cause the object to float and it never calls OnProjectileStop.
Nice! Though, OnProjectileStop seems to be called prematurely. It's an annoyance when you create an object that is supposed to replace the projectile under OnProjectileStop (the replacement object would be in the air instead of on the ground).
AndySedeyn is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Vehicle Projectile Detection Killa[DGZ] Scripting Help 7 04/10/2016 10:52 AM
[FilterScript] Soccer Mod PeppeAC -Small Edited by me. Ivander Filterscripts 6 29/09/2013 04:34 PM
Must be a simpler but efficient way to show textdraw countdowns for two players [REP++] Hoborific Scripting Help 0 06/02/2012 11:43 AM


All times are GMT. The time now is 07:26 PM.


Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.