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
5 registered members (Dico, AndrewAMD, TipmyPip, NewbieZorro, Grant), 15,791 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
Collision Engine #190034
03/23/08 19:02
03/23/08 19:02
Joined: Mar 2007
Posts: 151
JokeSpeaker Offline OP
Member
JokeSpeaker  Offline OP
Member

Joined: Mar 2007
Posts: 151
Hi, I am a noob in physic engine. Before I have a7 commercial, I only worked with c_move.
I tested the physic engine. But now I have a problem:
I builded a snowman with 3 sphere-objects and a box-object, the hat. But the snowman fall on the floor. I must say it, that he must wait until the player collide with the snowman. How can I scan collisions with physic objects?
I tested ENABLE_... and events. But they don't run.

short: How can I find out during the game, which model (pointer) collide with the physic?
And the second question: How can a model find out, which physic-entity (pointer) collide with this?

Re: Collision Engine [Re: JokeSpeaker] #190035
03/23/08 20:21
03/23/08 20:21

A
Anonymous
Unregistered
Anonymous
Unregistered
A



I don't know physics at all but couldn't you make the snowman a non physics object then when the player hits it with a c_move change it to a physics objct and apply the players move vector as a force. I'm sure some one who knows the physics engine could tell you more.

action player()
{
stuff here...
c_move(ect)
if(trace_hit)
if(you !=null)
if(you==snowman)
you.become_PH_object=true;
vec_set(you.focre,my.move.x);
}
action snowman_act()
{
var changed;
while(my!=NULL )
if(my.become_PH_object==ture && chagned==false)
changed=1;
make_me_aPH_object......
PH_force_of_some_type=vector(my.force)

}

you fallow...
Hopefully some one that knows this stuff can help more
Malice

Re: Collision Engine [Re: ] #190036
03/23/08 20:26
03/23/08 20:26
Joined: Mar 2007
Posts: 151
JokeSpeaker Offline OP
Member
JokeSpeaker  Offline OP
Member

Joined: Mar 2007
Posts: 151
yes, that good, but my player is also a physic object. A sphere, that rolls through levels, controlled with addcentralforce by the arrow keys.

Re: Collision Engine [Re: JokeSpeaker] #190037
03/25/08 09:03
03/25/08 09:03
Joined: Mar 2007
Posts: 151
JokeSpeaker Offline OP
Member
JokeSpeaker  Offline OP
Member

Joined: Mar 2007
Posts: 151
Sry for doublepost, but I tried all event function with enable and my.event, c_trace in all directions and c_move with nullvectors. All these don't notice any body...
I don't know, how it should be script.

To best, I post my two actions:
Code:
action snow()
{
if(toon_onoff == 1) //set toon shader if this var is 1
{
my.material = mtl_toon;
}
phent_settype(my,PH_RIGID, PH_SPHERE); //set physic engine
phent_setmass(my,mass/2,PH_SPHERE);
phent_setfriction(my,friction);
phent_setdamping(my,damping_a,damping_b);
phent_setelasticity(my,elasticity_a,elasticity_b);
}
action player_()
{
set(my,INVISIBLE); //invisible, because this is only the bounding entity. A model with the original look will set on player_()s position and rotates.
Player = my;
ent_create("player.mdl",my.x,sphere); //this is the "original"
while(me)
{
ent_create("alpha.mdl",my.x,alpher); //an passable effect
wait(5);
}
}




I need the collision detection for passable areas, in this the player activates event, for example sucking from a vacuum cleaner or scanning if the player is in this area (finish area).

Re: Collision Engine [Re: JokeSpeaker] #190038
03/26/08 01:15
03/26/08 01:15

A
Anonymous
Unregistered
Anonymous
Unregistered
A



Ok like I said I know nothing about the physics stuff but what about event_friction?

couldn't you make the snow man a have constraints then remove them on event friction some how?

Sorry I really can't help

Re: Collision Engine [Re: ] #190039
03/27/08 09:14
03/27/08 09:14
Joined: Mar 2007
Posts: 151
JokeSpeaker Offline OP
Member
JokeSpeaker  Offline OP
Member

Joined: Mar 2007
Posts: 151
Also event_friction don't get on if the physic object collide the snowman...

I wan't know only, how I can make the collision detection rightly.
And how can a passable map entity notice, that a physic object with the pointer Player is in this?


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