SA-MP Forums

Go Back   SA-MP Forums > SA-MP Scripting and Plugins > Plugin Development

Reply
 
Thread Tools Display Modes
Old 30/03/2016, 07:22 AM   #71
ipsBruno
Godfather
 
ipsBruno's Avatar
 
Join Date: Apr 2010
Location: Brazil, Caxias RS
Posts: 6,084
Reputation: 545
Default Respuesta: Re: cimulator - collision detection and physics simulation

Quote:
Originally Posted by codectile View Post
@ipsBruno, I am currently working on a big update, which will include some demos of vehicle collisions and few other.

Here is a basic demo, Basic Demo. I made it in a hurry so it's not well documented but for a scripter it is easy to understand by just looking at the functions.
Yea, i see it.

Other question:
Quote:
Originally Posted by ipsBruno View Post
ColAndreas or Cimulator have any function to return all collisions points of an object?


With this, i can convert object data collision to polygan, and implement a awesome pathfind based this


Thank you
__________________
https://github.com/ipsBruno
ipsBruno is offline   Reply With Quote
Old 30/03/2016, 09:10 AM   #72
codectile
Huge Clucker
 
codectile's Avatar
 
Join Date: Jul 2014
Posts: 248
Reputation: 116
Default Re: cimulator - collision detection and physics simulation

The picture you posted, is valid only for 2D polygons which is only fit for 2D pathfinding. In our case, everything is in 3D and a single model contains various sub collision shapes such as rectangles, spheres, mesh, etc. Most of the models contains spheres as sub collision shapes, now tell me does sphere has vertices? The answer is no. Your NPC will get confused when a spherical object/model is placed in front of him.
codectile is offline   Reply With Quote
Old 30/03/2016, 12:57 PM   #73
ipsBruno
Godfather
 
ipsBruno's Avatar
 
Join Date: Apr 2010
Location: Brazil, Caxias RS
Posts: 6,084
Reputation: 545
Default Respuesta: Re: cimulator - collision detection and physics simulation

Quote:
Originally Posted by codectile View Post
The picture you posted, is valid only for 2D polygons which is only fit for 2D pathfinding. In our case, everything is in 3D and a single model contains various sub collision shapes such as rectangles, spheres, mesh, etc. Most of the models contains spheres as sub collision shapes, now tell me does sphere has vertices? The answer is no. Your NPC will get confused when a spherical object/model is placed in front of him.
But Cimulator have any method to check all x,y,z collisions in object?
__________________
https://github.com/ipsBruno
ipsBruno is offline   Reply With Quote
Old 30/03/2016, 02:34 PM   #74
Crayder
Banned
 
Join Date: Sep 2013
Location: Flames of Hell
Posts: 3,329
Reputation: 652
Default Re: Respuesta: Re: cimulator - collision detection and physics simulation

Quote:
Originally Posted by ipsBruno View Post
But Cimulator have any method to check all x,y,z collisions in object?
The general path finding algorithms work with 3D. You just have to link all of the points which is the hard part.
Crayder is offline   Reply With Quote
Old 30/03/2016, 03:34 PM   #75
ipsBruno
Godfather
 
ipsBruno's Avatar
 
Join Date: Apr 2010
Location: Brazil, Caxias RS
Posts: 6,084
Reputation: 545
Default Respuesta: Re: Respuesta: Re: cimulator - collision detection and physics simulation

Quote:
Originally Posted by Crayder View Post
The general path finding algorithms work with 3D. You just have to link all of the points which is the hard part.

Thank you.

I posted it, because a need fastest way to map all collisions arround map, and linked the nodes points.
ipsBruno is offline   Reply With Quote
Old 30/03/2016, 04:07 PM   #76
Crayder
Banned
 
Join Date: Sep 2013
Location: Flames of Hell
Posts: 3,329
Reputation: 652
Default Re: Respuesta: Re: Respuesta: Re: cimulator - collision detection and physics simulation

Quote:
Originally Posted by ipsBruno View Post
Thank you.

I posted it, because a need fastest way to map all collisions arround map, and linked the nodes points.
[ame]http://www.youtube.com/watch?v=XsP87BkBemw[/ame]

That's what we need to generate. No, Bullet can't generate the nodes and connections for us.
Crayder is offline   Reply With Quote
Old 30/03/2016, 07:11 PM   #77
Finn
High-roller
 
Join Date: Jan 2008
Posts: 1,464
Reputation: 382
Default Re: cimulator - collision detection and physics simulation

Amazing to see what kind of things can be done in SA-MP, this makes those pool mini-games look too simple. With this you can make the pool balls jump off the table and continue playing on the floor! lol

Amazing work!
Finn is offline   Reply With Quote
Old 03/04/2016, 03:50 PM   #78
codectile
Huge Clucker
 
codectile's Avatar
 
Join Date: Jul 2014
Posts: 248
Reputation: 116
Default Re: cimulator - collision detection and physics simulation

cimulator-1.07 has been released.

Update Notes:

- renamed RayTrace funtions to RayCast
- now users has an ability to set their own data(integer/float) to their collision volumes
- now CR_CreateStaticCol and CR_CreateDynamicCol returns the collision index, so now you don't have to set an index for you collision volumes manually
- added an inertia parameter in CR_CreateDynamicCol which by default set to 0
- added data related natives CR_SetStaticData, CR_SetDynamicData, CR_GetStaticInt, CR_GetDynamicInt, CR_GetStaticFloat and CR_GetDynamicFloat
- added natives CR_RayCastIntData and CR_RayCastFloatData, which passes the required data(set by the user) by reference
- added pool related natives, CR_GetStaticPool and CR_GetDynamicPool
- renamed "IndexAvailable" functions to "SlotUsed", short and simple
- removed CR_StaticContactTest, use CR_ContactTestEx instead
- removed unnecessary functions
- minor fixes

For a detailed documentation on natives, consult cimulator.inc.

One more thing, I'll be updating and adding demos a bit later.

EDIT:

cimulator-1.09 has been released.

Update Notes:

- Fixed an issue where destroying vehicle collision crashes the server
- added few natives, view the changes here

...and thanks to Crayder for suggesting me to use the AABB method instead of Bounding Sphere method in "CR_PlaceObjectOnGround"

Last edited by codectile; 17/04/2016 at 02:24 PM.
codectile is offline   Reply With Quote
Old 03/05/2016, 01:09 AM   #79
Pottus
High-roller
 
Pottus's Avatar
 
Join Date: Jun 2012
Posts: 4,892
Reputation: 1321
Default Re: cimulator - collision detection and physics simulation

I really like all the work on this plugin and wish I had more time to develop on these ideas. It's really nice to see that all the work we put in to make ColAndreas went on to new concepts as well. This plugin brings SA-MP to the next level.
Pottus is offline   Reply With Quote
Old 03/05/2016, 08:05 AM   #80
AIped
Gangsta
 
AIped's Avatar
 
Join Date: Feb 2011
Location: Netherlands
Posts: 618
Reputation: 46
Default Re: cimulator - collision detection and physics simulation

would be great if there is something about this in the sa-mp wiki like colandreas did.

Quote:
Originally Posted by Pottus View Post
I really like all the work on this plugin and wish I had more time to develop on these ideas. It's really nice to see that all the work we put in to make ColAndreas went on to new concepts as well. This plugin brings SA-MP to the next level.
Hell yea!
__________________
Want some traffic?

http://forum.sa-mp.com/showthread.php?t=587634
AIped 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
Collision Detection (Plugin) Deduction Scripting Help 0 27/12/2013 04:24 AM
Collision Detection? NumbSkull Scripting Help 4 13/11/2012 03:27 AM


All times are GMT. The time now is 03:31 PM.


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