Gamestudio Links
Zorro Links
Newest Posts
Zorro FIX plugin - Experimental
by flink. 04/21/24 07:12
Data from CSV not parsed correctly
by EternallyCurious. 04/20/24 21:39
M1 Oversampling
by 11honza11. 04/20/24 20:57
Scripts not found
by juergen_wue. 04/20/24 18:51
zorro 64bit command line support
by 7th_zorro. 04/20/24 10:06
StartWeek not working as it should
by jcl. 04/20/24 08:38
folder management functions
by VoroneTZ. 04/17/24 06:52
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
1 registered members (rki), 405 guests, and 1 spider.
Key: Admin, Global Mod, Mod
Newest Members
EternallyCurious, howardR, 11honza11, ccorrea, sakolin
19047 Registered Users
Previous Thread
Next Thread
Print Thread
Rating: 5
Page 12 of 16 1 2 10 11 12 13 14 15 16
Re: newton [Re: ventilator] #113151
02/02/08 23:12
02/02/08 23:12
Joined: Aug 2004
Posts: 1,345
Kyiv, Ukraine
VeT Offline

Serious User
VeT  Offline

Serious User

Joined: Aug 2004
Posts: 1,345
Kyiv, Ukraine
i'd try to explain as understandable as possible

i have box (top view)
++++
++++
++++
++++


when i shoot near left corner, box is moving by clock
->
++++
++++
++++
^+++


but when i shoot near right corner, box may move in another side, but he is still moving by clock
->
++++
++++
++++
+++^

maybe, this is trouble with mass matrix or someting like that?


1st prize: Lite-C and Newton 2.17 by Vasilenko Vitaliy

Newton2 videos: http://tinyurl.com/NewtonVideos
LiteC+Newton2 discussion: http://tinyurl.com/NewtonWrapperDiscussion
Latest LiteC+Newton2 version(v23, from 29.10.2009): http://depositfiles.com/files/ae1l0tpro
Re: newton [Re: VeT] #113152
02/02/08 23:30
02/02/08 23:30
Joined: May 2002
Posts: 7,441
ventilator Offline OP
Senior Expert
ventilator  Offline OP
Senior Expert

Joined: May 2002
Posts: 7,441
try to use the trace direction instead of vectorf(-normal.x,-normal.y,-normal.z).

(and the origin of the model should be in the center of the cube.)

Re: newton [Re: ventilator] #113153
02/03/08 10:52
02/03/08 10:52
Joined: Aug 2004
Posts: 1,345
Kyiv, Ukraine
VeT Offline

Serious User
VeT  Offline

Serious User

Joined: Aug 2004
Posts: 1,345
Kyiv, Ukraine
i had tried that
Code:
 
vec_diff(temp_vec2.x,temp_vec.x,camera.x); // temp_vec2 from camera to target
vec_normalize(temp_vec2.x,1); // lenth of temp_vec2 = 1
NewtonAddBodyImpulse(body_temp, vectorf(temp_vec2.x,temp_vec2.y,temp_vec2.z),
vectorf(temp_vec.x * QUANTTOMETER, temp_vec.y * QUANTTOMETER, temp_vec.z * QUANTTOMETER) );



but the effect is similar

and the origin of model if exactly in the center(just because its your model crate.mdl )

Last edited by VeT; 02/03/08 11:08.
Re: newton [Re: VeT] #113154
02/03/08 18:42
02/03/08 18:42
Joined: Aug 2004
Posts: 1,345
Kyiv, Ukraine
VeT Offline

Serious User
VeT  Offline

Serious User

Joined: Aug 2004
Posts: 1,345
Kyiv, Ukraine
i have idea....

for example, i have box:
[++++++++++++++++++++^++++++++]

so i may count distance from "^" to "]"... and add to vertex not all force, just a part of it... but, on the other hand, its not too important...


1st prize: Lite-C and Newton 2.17 by Vasilenko Vitaliy

Newton2 videos: http://tinyurl.com/NewtonVideos
LiteC+Newton2 discussion: http://tinyurl.com/NewtonWrapperDiscussion
Latest LiteC+Newton2 version(v23, from 29.10.2009): http://depositfiles.com/files/ae1l0tpro
Re: newton [Re: VeT] #113155
02/05/08 21:26
02/05/08 21:26
Joined: Aug 2004
Posts: 1,345
Kyiv, Ukraine
VeT Offline

Serious User
VeT  Offline

Serious User

Joined: Aug 2004
Posts: 1,345
Kyiv, Ukraine
okay, that's really not too important:)
thanks)))


1st prize: Lite-C and Newton 2.17 by Vasilenko Vitaliy

Newton2 videos: http://tinyurl.com/NewtonVideos
LiteC+Newton2 discussion: http://tinyurl.com/NewtonWrapperDiscussion
Latest LiteC+Newton2 version(v23, from 29.10.2009): http://depositfiles.com/files/ae1l0tpro
Re: newton [Re: VeT] #113156
02/05/08 21:58
02/05/08 21:58
Joined: Aug 2004
Posts: 1,345
Kyiv, Ukraine
VeT Offline

Serious User
VeT  Offline

Serious User

Joined: Aug 2004
Posts: 1,345
Kyiv, Ukraine
okay, going to materials...

so i have bullet
Code:
 
you = ent_create(bullet_mdl,my.x,0);
you.scale_x=.5; you.scale_y=.25; you.scale_z=.25;
vec_set(you.pan,my.pan);
you.skill99 = newton_addentity(you, 1, NEWTON_SPHERE, Bulletforceandtorque);
NewtonBodySetMaterialGroupID(you.skill99,bullet_nmat);



and box

Code:
 
action box_weapon_test()
{
c_setminmax(me);
my.skill99 = newton_addentity(me, 15, NEWTON_BOX, onforceandtorque);
NewtonBodySetMaterialGroupID(my.skill99,box_nmat);
}



and collision

Code:
 
NewtonMaterialSetCollisionCallback(nworld, bullet_nmat, box_nmat, 0, collided_ground, collided_ground2, collided_ground3);
NewtonMaterialSetDefaultCollidable(nworld, bullet_nmat, box_nmat, 1);



collided_ground - just beeps 1,2 and 3 times



so, bullet collides with box and nothing changes and beeps...


1st prize: Lite-C and Newton 2.17 by Vasilenko Vitaliy

Newton2 videos: http://tinyurl.com/NewtonVideos
LiteC+Newton2 discussion: http://tinyurl.com/NewtonWrapperDiscussion
Latest LiteC+Newton2 version(v23, from 29.10.2009): http://depositfiles.com/files/ae1l0tpro
Re: newton [Re: VeT] #113157
02/05/08 22:03
02/05/08 22:03
Joined: May 2002
Posts: 7,441
ventilator Offline OP
Senior Expert
ventilator  Offline OP
Senior Expert

Joined: May 2002
Posts: 7,441
i don't understand. when does it beep and when doesn't it beep? can you also show your callbacks?

Re: newton [Re: ventilator] #113158
02/05/08 22:57
02/05/08 22:57
Joined: Aug 2004
Posts: 1,345
Kyiv, Ukraine
VeT Offline

Serious User
VeT  Offline

Serious User

Joined: Aug 2004
Posts: 1,345
Kyiv, Ukraine
hm... some materials are beeping, other - are not... i'd try to search solution in practical way and i'd write here, as i will get interesting results...

Quote:

when does it beep and when doesn't it beep?



it may beep all time, but sometimes(using different pairs of materials) i have no sound at all


1st prize: Lite-C and Newton 2.17 by Vasilenko Vitaliy

Newton2 videos: http://tinyurl.com/NewtonVideos
LiteC+Newton2 discussion: http://tinyurl.com/NewtonWrapperDiscussion
Latest LiteC+Newton2 version(v23, from 29.10.2009): http://depositfiles.com/files/ae1l0tpro
Re: newton [Re: VeT] #113159
02/05/08 23:23
02/05/08 23:23
Joined: Aug 2004
Posts: 1,345
Kyiv, Ukraine
VeT Offline

Serious User
VeT  Offline

Serious User

Joined: Aug 2004
Posts: 1,345
Kyiv, Ukraine
i find!

Code:
 my.skill99 = newton_addentity(me, 15, NEWTON_BOX, onforceandtorque);
NewtonBodySetMaterialGroupID(my.skill99,box_nmat);



this is bad one...


Code:
 
NewtonBodySetMaterialGroupID(newton_addentity(you, 1, NEWTON_SPHERE, Bulletforceandtorque),bullet_nmat);


this wokrs


1st prize: Lite-C and Newton 2.17 by Vasilenko Vitaliy

Newton2 videos: http://tinyurl.com/NewtonVideos
LiteC+Newton2 discussion: http://tinyurl.com/NewtonWrapperDiscussion
Latest LiteC+Newton2 version(v23, from 29.10.2009): http://depositfiles.com/files/ae1l0tpro
Re: newton [Re: VeT] #113160
02/05/08 23:31
02/05/08 23:31
Joined: May 2002
Posts: 7,441
ventilator Offline OP
Senior Expert
ventilator  Offline OP
Senior Expert

Joined: May 2002
Posts: 7,441
hm... probably it's some lite-c quirk with how the pointer gets converted to the var skill. you could try to cast the pointer somehow. or use your method that works.

Page 12 of 16 1 2 10 11 12 13 14 15 16

Moderated by  HeelX, Lukas, rayp, Rei_Ayanami, Superku, Tobias, TWO, VeT 

Gamestudio download | chip programmers | Zorro platform | shop | Data Protection Policy

oP group Germany GmbH | Birkenstr. 25-27 | 63549 Ronneburg / Germany | info (at) opgroup.de

Powered by UBB.threads™ PHP Forum Software 7.7.1