Burgershot
  • Home
  • Members
  • Team
  • Help
  • Search
  • Register
  • Login
  • Home
  • Members
  • Help
  • Search
Burgershot SA-MP Releases Plugins [Plugin] ColAndreas - Collision Detection and Raytracing

 
  • 1 Vote(s) - 5 Average
Plugin ColAndreas - Collision Detection and Raytracing
Crayder
Offline

Burgershot Member
Posts: 18
Threads: 4
Joined: Mar 2019
Reputation: 7
Location: The 'Ville, Indiana
#1
2019-04-14, 02:38 PM (This post was last modified: 2019-04-15, 03:47 AM by Kar.)
[Image: in7FgoQ.gif]
____________________________________________________________________________________________________

Developers:

Initial Developers:
[uL]Slice
[uL]Chris420
[uL]Pottus
Latest Developers:
uint32 (new developer ?) (Where'd ya go?) - This guy fixed some major shit, including the initial SA-MP object thing.
Crayder
Codectile
____________________________________________________________________________________________________

Download today!
____________________________________________________________________________________________________

Installation Instructions:
  1. Navigate to the github repository's release section (link above) and download the latest version.
  2. If you don't need the source just download the wizard, the plugin, and include.
  3. Run the binary builder application. This will generate a binary in which ColAndreas load data from.
  4. Create a folder in your scriptfiles called "colandreas" and place the binary file there.
  5. Add ColAndreas to your server.cfg.
____________________________________________________________________________________________________

Current Functions:
Code:
CA_ContactTest(modelid, Float:x, Float:y, Float:z, Float:rx, Float:ry, Float:rz)
CA_CreateDynamicObject_DC(modelid, Float:x, Float:y, Float:z, Float:rx, Float:ry, Float:rz, vw = -1, interior = -1, playerid = -1, Float:streamdist = 300.0, Float:drawdist = 300.0)
CA_CreateDynamicObject_SC(modelid, Float:x, Float:y, Float:z, Float:rx, Float:ry, Float:rz, vw = -1, interior = -1, playerid = -1, Float:streamdist = 300.0, Float:drawdist = 300.0)
CA_CreateDynamicObjectEx_DC(modelid, Float:x, Float:y, Float:z, Float:rx, Float:ry, Float:rz, Float:drawdistance = 0.0, Float:streamdistance = 200.0, worlds[] = { -1 }, interiors[] = { -1 }, players[] = { -1 }, maxworlds = sizeof worlds, maxinteriors = sizeof interiors, maxplayers = sizeof players)
CA_CreateDynamicObjectEx_SC(modelid, Float:x, Float:y, Float:z, Float:rx, Float:ry, Float:rz, Float:drawdistance = 0.0, Float:streamdistance = 200.0, worlds[] = { -1 }, interiors[] = { -1 }, players[] = { -1 }, maxworlds = sizeof worlds, maxinteriors = sizeof interiors, maxplayers = sizeof players)
CA_CreateObject(modelid, Float:x, Float:y, Float:z, Float:rx, Float:ry, Float:rz, bool:add = false)
CA_CreateObject_DC(modelid, Float:x, Float:y, Float:z, Float:rx, Float:ry, Float:rz, Float:drawdistance = 300.0)
CA_CreateObject_SC(modelid, Float:x, Float:y, Float:z, Float:rx, Float:ry, Float:rz, Float:drawdistance = 300.0)
CA_DestroyAllObjects_DC()
CA_DestroyObject(index)
CA_DestroyObject_DC(index)
CA_EulerToQuat(Float:rx, Float:ry, Float:rz, &Float:x, &Float:y, &Float:z, &Float:w)
CA_FindZ_For2DCoord(Float:x, Float:y, &Float:z)
CA_GetModelBoundingBox(modelid, &Float:minx, &Float:miny, &Float:minz, &Float:maxx, &Float:maxy, &Float:maxz)
CA_GetModelBoundingSphere(modelid, &Float:offx, &Float:offy, &Float:offz, &Float:radius)
CA_GetObjectExtraID(index, type)
CA_Init()
CA_IsPlayerBlocked(playerid, Float:dist=1.5, Float:height=0.5)
CA_IsPlayerInWater(playerid, &Float:depth, &Float:playerdepth)
CA_IsPlayerNearWater(playerid, Float:dist=3.0, Float:height=3.0)
CA_IsPlayerOnSurface(playerid, Float:tolerance=1.5)
CA_QuatToEuler(Float:x, Float:y, Float:z, Float:w, &Float:rx, &Float:ry, &Float:rz)
CA_RayCastLine(Float:StartX, Float:StartY, Float:StartZ, Float:EndX, Float:EndY, Float:EndZ, &Float:x, &Float:y, &Float:z)
CA_RayCastLineAngle(Float:StartX, Float:StartY, Float:StartZ, Float:EndX, Float:EndY, Float:EndZ, &Float:x, &Float:y, &Float:z, &Float:rx, &Float:ry, &Float:rz)
CA_RayCastLineAngleEx(Float:StartX, Float:StartY, Float:StartZ, Float:EndX, Float:EndY, Float:EndZ, &Float:x, &Float:y, &Float:z, &Float:rx, &Float:ry, &Float:rz, &Float:ocx, &Float:ocy, &Float:ocz, &Float:orx, &Float:ory, &Float:orz)
CA_RayCastLineExtraID(type, Float:StartX, Float:StartY, Float:StartZ, Float:EndX, Float:EndY, Float:EndZ, &Float:x, &Float:y, &Float:z)
CA_RayCastLineEx(Float:StartX, Float:StartY, Float:StartZ, Float:EndX, Float:EndY, Float:EndZ, &Float:x, &Float:y, &Float:z, &Float:rx, &Float:ry, &Float:rz, &Float:rw, &Float:cx, &Float:cy, &Float:cz)
CA_RayCastLineID(Float:StartX, Float:StartY, Float:StartZ, Float:EndX, Float:EndY, Float:EndZ, &Float:x, &Float:y, &Float:z)
CA_RayCastLineNormal(Float:startx, Float:starty, Float:startz, Float:endx, Float:endy, Float:endz, &Float:x, &Float:y, &Float:z, &Float:nx, &Float:ny, &Float:nz)
CA_RayCastMultiLine(Float:StartX, Float:StartY, Float:StartZ, Float:EndX, Float:EndY, Float:EndZ, Float:retx[], Float:rety[], Float:retz[], Float:retdist[], ModelIDs[], size = sizeof(retx))
CA_RayCastReflectionVector(Float:startx, Float:starty, Float:startz, Float:endx, Float:endy, Float:endz, &Float:x, &Float:y, &Float:z, &Float:nx, &Float:ny, &Float:nz)
CA_RemoveBarriers()
CA_RemoveBreakableBuildings()
CA_RemoveBuilding(modelid, Float:x, Float:y, Float:z, Float:radius)
CA_SetObjectExtraID(index, type, data)
CA_SetObjectPos(index, Float:x, Float:y, Float:z)
CA_SetObjectPos_DC(index, Float:x, Float:y, Float:z)
CA_SetObjectRot(index, Float:rx, Float:ry, Float:rz)
CA_SetObjectRot_DC(index, Float:rx, Float:ry, Float:rz)
Float:CA_GetRoomHeight(Float:x, Float:y, Float:z)
____________________________________________________________________________________________________

Loading ColAndreas:

We recommend using a filterscript to help organize your objects. There is a specific order of operations required to load successfully.

Code:
public OnFilterScriptInit()
{
// Add any remove buildings (This only works once)
CA_RemoveBuilding();

// Initialize the collision world (This creates San Andreas, the entire map, excluding removed buildings)
CA_Init();

// Create objects
CA_CreateDynamicObject_SC();

return 1;
}
____________________________________________________________________________________________________

Capability Demo:
[Video: http://www.youtube.com/watch?v=aSabQWqQBkI]
____________________________________________________________________________________________________

Known Issues:
  • There is no virtual world / interior support (there may never be).
[Image: uc?export=view&id=1C5dMc9kb09iAUuASWBEPCK21lsedAXmB]
Crayder
Offline

Burgershot Member
Posts: 18
Threads: 4
Joined: Mar 2019
Reputation: 7
Location: The 'Ville, Indiana
#2
2019-04-14, 06:02 PM
https://github.com/Pottus/ColAndreas/wiki

The wiki has been updated. Installation and usage should be much easier now! Let me know if you have any further questions, inquiries, or issues.
[Image: uc?export=view&id=1C5dMc9kb09iAUuASWBEPCK21lsedAXmB]
Mugsy Away

Desarollador
Posts: 171
Threads: 10
Joined: Apr 2019
Reputation: 0
Location: Spain
#3
2019-04-14, 08:50 PM
good thread
[Image: oN9R4KR.gif]
adri1
Offline

retarded
Posts: 21
Threads: 4
Joined: Apr 2019
Reputation: 8
#4
2019-08-03, 03:59 PM
does this works with 0.3.DL custom objects?
Crayder
Offline

Burgershot Member
Posts: 18
Threads: 4
Joined: Mar 2019
Reputation: 7
Location: The 'Ville, Indiana
#5
2019-09-27, 08:17 PM
(2019-08-03, 03:59 PM)adri1 Wrote: does this works with 0.3.DL custom objects?

It does now, thanks to iAmir
[Image: uc?export=view&id=1C5dMc9kb09iAUuASWBEPCK21lsedAXmB]
Josh
Offline

Administrator

Posts: 129
Threads: 1
Joined: Feb 2019
Reputation: 20
#6
2019-09-27, 09:18 PM
(2019-09-27, 08:17 PM)Crayder Wrote:
(2019-08-03, 03:59 PM)adri1 Wrote: does this works with 0.3.DL custom objects?

It does now, thanks to iAmir

thank me too
Jackins
Offline

Burgershot Member
Posts: 1
Threads: 0
Joined: Apr 2019
Reputation: 0
Location: Ukraine, Berdyansk
#7
2019-11-27, 08:13 PM
Not working on Debian9
JustMe.77
Offline

Burgershot Member
Posts: 1
Threads: 0
Joined: Apr 2019
Reputation: 0
Location: Germany
#8
2021-01-03, 03:55 PM
I'm having these Errors if I try to compile my gamemode:


../Modules/Server/tpgun.pwn(108) : warning 202: number of arguments does not match definition
../Modules/Server/tpgun.pwn(108) : warning 202: number of arguments does not match definition
../Modules/Server/tpgun.pwn(108) : warning 202: number of arguments does not match definition
../Modules/Server/tpgun.pwn(108) : warning 202: number of arguments does not match definition
../Modules/Server/tpgun.pwn(108) : warning 202: number of arguments does not match definition
../Modules/Server/tpgun.pwn(114) : error 017: undefined symbol "CA_CreateDynamicObjectEx_SC"


Code:
public OnGameModeInit()
{
  // Objects need to be removed BEFORE calling CA_Init
CA_RemoveBuilding(); //Line 108

  // Load the SA map
CA_Init();

// Create objects and add them to the simulation
CA_CreateDynamicObjectEx_SC();

#if defined tpgun_OnGameModeInit
    return tpgun_OnGameModeInit();
    #else
    return 1;
    #endif
}
DanMas
Offline

Burgershot Member
Posts: 4
Threads: 1
Joined: Jan 2021
Reputation: 0
#9
2021-01-06, 01:53 PM
it will be very useful, if you add function like CA_IsPlayerInWater, who shows depth and playerdepth to the water, but for the ground. Or i can do it somehow in my own scripts?

(2021-01-03, 03:55 PM)JustMe.77 Wrote: ..
and you need to look arguments in colandreas.inc for functions. CA_RemoveBuilding like same RemoveBuildingForPlayer, but without playerid, and CA_CreateDynamicObjectEx_SC, its CreateDynamicObjectEx extension from streamer plugin, who also adds collision as i know ( read more wiki ). You can keep only CA_Init(); and map will be loaded if you have colandreas.cadb
« Next Oldest | Next Newest »



  • View a Printable Version
  • Subscribe to this thread
Forum Jump:

© Burgershot - Powered by our Community and MyBB Original Theme by Emerald

Linear Mode
Threaded Mode