|
|
Phyics Collisions with Non Physics
#60386
12/11/05 10:19
12/11/05 10:19
|
Joined: Mar 2003
Posts: 4,427 Japan
A.Russell
OP
Expert
|
OP
Expert
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]
#60389
12/12/05 02:27
12/12/05 02:27
|
Joined: Dec 2001
Posts: 2,172 Portugal - Brazil
XNASorcerer
Expert
|
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: A.Russell]
#60392
12/18/05 13:22
12/18/05 13:22
|
Joined: Oct 2003
Posts: 1,550 United Kingdom
indiGLOW
Serious User
|
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.Russell
OP
Expert
|
OP
Expert
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
Serious User
|
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
|
|
|
|