[Plugin] cimulator - collision detection and physics simulation
#65

Try it on a new gamemode. Blowup.pwn will cause error as I have not updated it.

Under OnGameModeInit add:
Код:
CR_Load();
CR_SetWorldGravity(0.0, 0.0, -3.5);
CR_EnableSimulation();
Under OnPlayerCommandText add:

Код:
if (!strcmp("/throw", cmdtext, true)) //throws an object
{
	new index;
	new Float:vx, Float:vy, Float:vz;
        GetPlayerPos(playerid, vx, vy, vz);
 	new Float:facing;
 	GetPlayerFacingAngle(playerid, facing);
 	new ob = CreateDynamicObject(19342, vx + 5 * floatsin(-facing, degrees), vy + 5 * floatcos(-facing, degrees), vz, 0.0, 0.0, 0.0);
	 index = CR_CreateDynamicCol(ob, 19342, 1.7, vx + 1 * floatsin(-facing, degrees), vy + 1 * floatcos(-facing, degrees), vz, 0.0, 0.0, 0.0, 1);
 	CR_ThrowObject(playerid, index, 15.0);
	return 1;
}
Reply


Messages In This Thread
cimulator - collision detection and physics simulation - by codectile - 25.11.2015, 15:25
Re: cimulator - collision detection and physics simulation - by Pottus - 25.11.2015, 15:29
Re: cimulator - collision detection and physics simulation - by codectile - 25.11.2015, 15:44
Re: cimulator - collision detection and physics simulation - by Stanford - 03.12.2015, 15:34
Re: cimulator - collision detection and physics simulation - by SkittlesAreFalling - 03.12.2015, 15:37
Re: cimulator - collision detection and physics simulation - by codectile - 03.12.2015, 18:08
Re: cimulator - collision detection and physics simulation - by TwinkiDaBoss - 03.12.2015, 19:01
Re: cimulator - collision detection and physics simulation - by codectile - 04.12.2015, 01:54
Re: cimulator - collision detection and physics simulation - by Crayder - 04.12.2015, 03:03
Re: cimulator - collision detection and physics simulation - by codectile - 04.12.2015, 03:45
Re: cimulator - collision detection and physics simulation - by Crayder - 04.12.2015, 04:38
Re: cimulator - collision detection and physics simulation - by codectile - 04.12.2015, 11:44
Re: cimulator - collision detection and physics simulation - by Stanford - 04.12.2015, 12:28
Re: cimulator - collision detection and physics simulation - by Cypress - 05.12.2015, 19:57
Re: cimulator - collision detection and physics simulation - by DRIFT_HUNTER - 05.12.2015, 20:50
Re: cimulator - collision detection and physics simulation - by codectile - 06.12.2015, 03:48
Re: cimulator - collision detection and physics simulation - by Crayder - 06.12.2015, 14:46
Re: cimulator - collision detection and physics simulation - by codectile - 06.12.2015, 16:13
Re: cimulator - collision detection and physics simulation - by Crayder - 06.12.2015, 19:09
Re: cimulator - collision detection and physics simulation - by codectile - 07.12.2015, 01:48
Re: cimulator - collision detection and physics simulation - by iWhite - 07.12.2015, 13:12
Re: cimulator - collision detection and physics simulation - by Stanford - 07.12.2015, 13:49
Re: cimulator - collision detection and physics simulation - by Romz - 07.12.2015, 13:52
Re: cimulator - collision detection and physics simulation - by Crayder - 07.12.2015, 16:03
Re: cimulator - collision detection and physics simulation - by codectile - 07.12.2015, 17:03
Re: cimulator - collision detection and physics simulation - by Romz - 09.12.2015, 14:30
Re: cimulator - collision detection and physics simulation - by codectile - 10.12.2015, 09:17
Re: cimulator - collision detection and physics simulation - by Riddick94 - 16.12.2015, 20:53
Re: cimulator - collision detection and physics simulation - by DRIFT_HUNTER - 16.12.2015, 22:06
Re: cimulator - collision detection and physics simulation - by codectile - 17.12.2015, 02:18
Re: cimulator - collision detection and physics simulation - by DRIFT_HUNTER - 17.12.2015, 06:59
Re: cimulator - collision detection and physics simulation - by Stanford - 31.12.2015, 16:10
Re: cimulator - collision detection and physics simulation - by codectile - 31.12.2015, 17:32
Re: cimulator - collision detection and physics simulation - by Stanford - 31.12.2015, 18:12
Re: cimulator - collision detection and physics simulation - by codectile - 01.01.2016, 05:09
Re: cimulator - collision detection and physics simulation - by Romz - 03.01.2016, 16:11
Re: cimulator - collision detection and physics simulation - by codectile - 03.01.2016, 16:26
Re: cimulator - collision detection and physics simulation - by Stanford - 03.01.2016, 16:32
Re: cimulator - collision detection and physics simulation - by Romz - 03.01.2016, 17:55
Re: cimulator - collision detection and physics simulation - by Sublime - 04.01.2016, 12:16
Re: cimulator - collision detection and physics simulation - by codectile - 04.01.2016, 12:34
Re: cimulator - collision detection and physics simulation - by Stanford - 06.01.2016, 03:51
Re: cimulator - collision detection and physics simulation - by Crayder - 06.01.2016, 04:23
Re: cimulator - collision detection and physics simulation - by Stanford - 06.01.2016, 04:54
Re: cimulator - collision detection and physics simulation - by Crayder - 06.01.2016, 05:13
Re: cimulator - collision detection and physics simulation - by codectile - 06.01.2016, 12:29
Re: cimulator - collision detection and physics simulation - by Stanford - 06.01.2016, 18:51
Re: cimulator - collision detection and physics simulation - by codectile - 07.01.2016, 08:46
Re: cimulator - collision detection and physics simulation - by Stanford - 07.01.2016, 10:00
Re: cimulator - collision detection and physics simulation - by tungki - 07.01.2016, 13:18
Respuesta: Re: cimulator - collision detection and physics simulation - by ipsBruno - 30.03.2016, 07:22
Re: cimulator - collision detection and physics simulation - by codectile - 30.03.2016, 09:10
Respuesta: Re: cimulator - collision detection and physics simulation - by ipsBruno - 30.03.2016, 12:57
Re: Respuesta: Re: cimulator - collision detection and physics simulation - by Crayder - 30.03.2016, 14:34
Respuesta: Re: Respuesta: Re: cimulator - collision detection and physics simulation - by ipsBruno - 30.03.2016, 15:34
Re: Respuesta: Re: Respuesta: Re: cimulator - collision detection and physics simulation - by Crayder - 30.03.2016, 16:07
Re: cimulator - collision detection and physics simulation - by Finn - 30.03.2016, 19:11
Re: cimulator - collision detection and physics simulation - by codectile - 03.04.2016, 15:50
Re: cimulator - collision detection and physics simulation - by Pottus - 03.05.2016, 01:09
Re: cimulator - collision detection and physics simulation - by AIped - 03.05.2016, 08:05
Re: cimulator - collision detection and physics simulation - by Sanady - 03.05.2016, 09:55
Re: cimulator - collision detection and physics simulation - by Sanady - 03.05.2016, 09:59
Re: cimulator - collision detection and physics simulation - by codectile - 03.05.2016, 10:47
Re: cimulator - collision detection and physics simulation - by Sanady - 03.05.2016, 11:31
Re: cimulator - collision detection and physics simulation - by codectile - 03.05.2016, 12:10
Re: cimulator - collision detection and physics simulation - by VAWYLoN - 14.05.2016, 03:26
Re: cimulator - collision detection and physics simulation - by Crayder - 16.05.2016, 13:19
Re: cimulator - collision detection and physics simulation - by VAWYLoN - 17.05.2016, 08:47
Re: cimulator - collision detection and physics simulation - by codectile - 24.06.2016, 08:48
Re: cimulator - collision detection and physics simulation - by Crayder - 24.06.2016, 19:59
Re: cimulator - collision detection and physics simulation - by usersamp - 05.08.2016, 12:44

Forum Jump:


Users browsing this thread: 2 Guest(s)