Gamestudio Links
Zorro Links
Newest Posts
Newbie Questions
by AndrewAMD. 12/05/23 10:56
Zorro Trader GPT
by TipmyPip. 12/04/23 11:34
Square root rule
by Smallz. 12/02/23 09:15
RTest not found error
by TipmyPip. 12/01/23 21:43
neural function for Python to [Train]
by TipmyPip. 12/01/23 14:47
Xor Memory Problem.
by TipmyPip. 11/28/23 14:23
Training with command line parameters
by TipmyPip. 11/26/23 08:42
Combine USD & BTC Pairs In Asset Loop
by TipmyPip. 11/26/23 08:30
AUM Magazine
Latest Screens
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Tactics of World War I
Who's Online Now
6 registered members (3run, AndrewAMD, alibaba, fairtrader, ozgur, TipmyPip), 605 guests, and 0 spiders.
Key: Admin, Global Mod, Mod
Newest Members
fairtrader, hus, Vurtis, Harry5, KelvinC
19019 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Page 1 of 2 1 2
Phyics Collisions with Non Physics #60386
12/11/05 10:19
12/11/05 10:19
Joined: Mar 2003
Posts: 4,427
Japan
A
A.Russell Offline OP
Expert
A.Russell  Offline OP
Expert
A

Joined: Mar 2003
Posts: 4,427
Japan
How can you avoid physics entities bouncing off certain non-physics entities? I have laser beams that should do damage to physics entities but not cause them to bounce. I can't stop them bouncing.

The non-physics entities are set to become passable on collision, do damge to the "you" entity (on event_entity) and their function is set to proc_late. I'm not sure if using ent_move or c-move should make a difference.

Last edited by A.Russell; 12/11/05 12:03.
Re: Phyics Collisions with Non Physics [Re: A.Russell] #60387
12/11/05 13:57
12/11/05 13:57
Joined: Dec 2001
Posts: 2,172
Portugal - Brazil
XNASorcerer Offline
Expert
XNASorcerer  Offline
Expert

Joined: Dec 2001
Posts: 2,172
Portugal - Brazil
With c_move try IGNORE_MODELS.

Re: Phyics Collisions with Non Physics [Re: XNASorcerer] #60388
12/12/05 02:09
12/12/05 02:09
Joined: Mar 2003
Posts: 4,427
Japan
A
A.Russell Offline OP
Expert
A.Russell  Offline OP
Expert
A

Joined: Mar 2003
Posts: 4,427
Japan
In that case won't it just fly straiht through the physics entities? I want to make the physics entities insensitive to hitting the the shots, not the shot from hitting the physics entities.

Re: Phyics Collisions with Non Physics [Re: A.Russell] #60389
12/12/05 02:27
12/12/05 02:27
Joined: Dec 2001
Posts: 2,172
Portugal - Brazil
XNASorcerer Offline
Expert
XNASorcerer  Offline
Expert

Joined: Dec 2001
Posts: 2,172
Portugal - Brazil
Quote:

In that case won't it just fly straiht through the physics entities?



Yes, it will. I can think on another way to help.
Suimassen.

Re: Phyics Collisions with Non Physics [Re: XNASorcerer] #60390
12/12/05 02:55
12/12/05 02:55
Joined: Mar 2003
Posts: 4,427
Japan
A
A.Russell Offline OP
Expert
A.Russell  Offline OP
Expert
A

Joined: Mar 2003
Posts: 4,427
Japan
...I'll try push values. Should have thought of that earlier.

Re: Phyics Collisions with Non Physics [Re: A.Russell] #60391
12/18/05 12:48
12/18/05 12:48
Joined: Mar 2003
Posts: 4,427
Japan
A
A.Russell Offline OP
Expert
A.Russell  Offline OP
Expert
A

Joined: Mar 2003
Posts: 4,427
Japan
Nope, push values don't work. Sometimes they collide and sometimes they don't.

Re: Phyics Collisions with Non Physics [Re: A.Russell] #60392
12/18/05 13:22
12/18/05 13:22
Joined: Oct 2003
Posts: 1,550
United Kingdom
indiGLOW Offline
Serious User
indiGLOW  Offline
Serious User

Joined: Oct 2003
Posts: 1,550
United Kingdom
Can you explain a little clearer what you are trying to do? Maybe a screen shot or something?

Are you saying the laser should hit boxes and move them, but if the boxes move into the lazer they shouldn't? Do you mean the long beam of the laser, not the tip?


The Art of Conversation is dead : Discuss
Re: Phyics Collisions with Non Physics [Re: indiGLOW] #60393
12/19/05 02:45
12/19/05 02:45
Joined: Mar 2003
Posts: 4,427
Japan
A
A.Russell Offline OP
Expert
A.Russell  Offline OP
Expert
A

Joined: Mar 2003
Posts: 4,427
Japan
The laser beams are models. They use c_move for their movement and collision detection. I have enabled event_entity and event_push for them. The physics object have their push value set to 99 and the laser beams' push is 1. Here is the event script:

Code:

function laserShotEvent()
{
if(event_type == event_entity || event_type == event_push)
{
if(you!=null)
{
if(you.ship_type!=laser_beam && you != my.creating_entity)
{
you.hit_points -= my.damage;
my.sound_handle = ent_playsound(my,snd_impact_1,350);
partFX_fireball();
my.passable = on;
my.alive = 0;
return;
}




return;

}
}
}



From the manual, entities with a lower push value are supposed to be run over by the higher push value entity. In a collision the lower push entity's event_push should be actived and you set to the entity that ran over it.

What actually happens is that the physics entities with higher push will not run over entities with lower push. They will act as if they hit an imovable object and bounce away.

Re: Phyics Collisions with Non Physics [Re: A.Russell] #60394
12/19/05 19:20
12/19/05 19:20
Joined: Oct 2003
Posts: 1,550
United Kingdom
indiGLOW Offline
Serious User
indiGLOW  Offline
Serious User

Joined: Oct 2003
Posts: 1,550
United Kingdom
So your not using phyics, but you want to create the illusion of them, using events for the models.... Just wanted to clarify that your not using actual physics?

Presuming the above: Further clarification of the following.

You fire the laser at some asteroids, the laser model hits the asteroid model causing a push event, but at the same time the asteroids are causing an event on the laser?

When you handle an event, you could compare you.push to my.push and this would stop the wrong events getting triggered. Also you might want to look at other events, such as impact ...

Im still having trouble understanding what is working and what isn't.


The Art of Conversation is dead : Discuss
Re: Phyics Collisions with Non Physics [Re: indiGLOW] #60395
12/22/05 01:52
12/22/05 01:52
Joined: Sep 2003
Posts: 3,236
San Diego, CA
M
Marco_Grubert Offline
Expert
Marco_Grubert  Offline
Expert
M

Joined: Sep 2003
Posts: 3,236
San Diego, CA
Push, event_entity and event_push are only used when calling c_move/ent_move. They are not part of the physics collision detection. The physics collision system only checks for group membership (to ignore physics entities of the same group) and the passable flag.
Maybe you can make your lasers passable and use scan or trigger to find out if a physics entity is nearby?

Page 1 of 2 1 2

Moderated by  HeelX, Spirit 

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