Gamestudio Links
Zorro Links
Newest Posts
Zorro 2.70
by jcl. 09/29/25 09:24
optimize global parameters SOLVED
by dBc. 09/27/25 17:07
ZorroGPT
by TipmyPip. 09/27/25 10:05
assetHistory one candle shift
by jcl. 09/21/25 11:36
Plugins update
by Grant. 09/17/25 16:28
AUM Magazine
Latest Screens
Rocker`s Revenge
Stug 3 Stormartillery
Iljuschin 2
Galactic Strike X
Who's Online Now
1 registered members (TipmyPip), 18,633 guests, and 5 spiders.
Key: Admin, Global Mod, Mod
Newest Members
krishna, DrissB, James168, Ed_Love, xtns
19168 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
[newton] detecting entities #71707
04/21/06 04:34
04/21/06 04:34
Joined: Apr 2006
Posts: 41
S
style_riser Offline OP
Newbie
style_riser  Offline OP
Newbie
S

Joined: Apr 2006
Posts: 41
hi, how can i detect collisions with both physics entities? and non-physics entities? THanks for your time.

Re: [newton] detecting entities [Re: style_riser] #71708
04/21/06 22:18
04/21/06 22:18
Joined: Apr 2006
Posts: 41
S
style_riser Offline OP
Newbie
style_riser  Offline OP
Newbie
S

Joined: Apr 2006
Posts: 41
Can someone tell me if in wrong? Do i create boxes or pheres same size and position as model in med, then create these models in my actions, update there positions same as main model and use these for collision detection? Or is there a more reliable way?

Re: [newton] detecting entities [Re: style_riser] #71709
04/21/06 23:18
04/21/06 23:18
Joined: Apr 2006
Posts: 41
S
style_riser Offline OP
Newbie
style_riser  Offline OP
Newbie
S

Joined: Apr 2006
Posts: 41
I'm using the following code but it's not working, block is not disapearing on impact.

Code:
 
action test_box_action
{
my.enable_impact = on;

}


function vehicle_impact_event
{
ent_remove (you);
wait(1);

}



action vehicle_collision_action
{
my.enable_impact = on;
my.event = vehicle_impact_event;

}




//in my car action i have
vehicle_collision_box = ent_create ("car_cbox.MDL", p_vehicle.x, vehicle_collision_action);








// and this in a loop
temp.x = 0;
temp.y = 0;
temp.z = 0;
// update collision box position
vec_rotate(temp, p_vehicle.pan); // This rotates the vector offset so
// that it is relative to the my entities
// position, not to world coordinates...
vec_add(temp.x, p_vehicle.x); // Add entities coordinates to it...
vec_set(vehicle_collision_box.x, temp.x); // Set entity to calculated position...
vec_set(vehicle_collision_box.pan, my.pan); // Set entity angle to my angle...



Re: [newton] detecting entities [Re: style_riser] #71710
04/21/06 23:24
04/21/06 23:24
Joined: Apr 2006
Posts: 41
S
style_riser Offline OP
Newbie
style_riser  Offline OP
Newbie
S

Joined: Apr 2006
Posts: 41
Just checked the manual and impact events require c_move or ent_move instructions? is this right, will i have to use ent_move?

Re: [newton] detecting entities [Re: style_riser] #71711
04/22/06 03:23
04/22/06 03:23
Joined: Apr 2006
Posts: 41
S
style_riser Offline OP
Newbie
style_riser  Offline OP
Newbie
S

Joined: Apr 2006
Posts: 41
Can someone please tell me the commands to use so one entity sticks to another with same pan, tilt & roll using c_move so they occupy the same space. Thank you.

Re: [newton] detecting entities [Re: style_riser] #71712
04/22/06 04:54
04/22/06 04:54
Joined: Apr 2006
Posts: 41
S
style_riser Offline OP
Newbie
style_riser  Offline OP
Newbie
S

Joined: Apr 2006
Posts: 41
Ive came up with this, is this correct? Is there a neater way?

Code:
 
c_move (vehicle_collision_box, nullvector, p_vehicle.x, IGNORE_YOU);
temp.x = 0;
temp.y = 0;
temp.z = 0;
// update collision box position
vec_rotate(temp, p_vehicle.pan); // This rotates the vector offset so
// that it is relative to the my entities
// position, not to world coordinates...
vec_add(temp.x, p_vehicle.x); // Add entities coordinates to it...
vec_set(vehicle_collision_box.x, temp.x); // Set entity to calculated position...
vec_set(vehicle_collision_box.pan, my.pan); // Set entity angle to my angle...





Moderated by  HeelX, Spirit 

Gamestudio download | 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