Gamestudio Links
Zorro Links
Newest Posts
Blobsculptor tools and objects download here
by NeoDumont. 03/28/24 03:01
Issue with Multi-Core WFO Training
by aliswee. 03/24/24 20:20
Why Zorro supports up to 72 cores?
by Edgar_Herrera. 03/23/24 21:41
Zorro Trader GPT
by TipmyPip. 03/06/24 09:27
VSCode instead of SED
by 3run. 03/01/24 19:06
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
2 registered members (AndrewAMD, Nymphodora), 972 guests, and 8 spiders.
Key: Admin, Global Mod, Mod
Newest Members
sakolin, rajesh7827, juergen_wue, NITRO_FOREVER, jack0roses
19043 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Page 2 of 3 1 2 3
Re: Problem with A 6 physics [Re: Mondivirtuali] #141673
07/19/07 00:26
07/19/07 00:26
Joined: Mar 2003
Posts: 5,377
USofA
fastlane69 Offline
Senior Expert
fastlane69  Offline
Senior Expert

Joined: Mar 2003
Posts: 5,377
USofA
Quote:

if I walk agaist him, it does not movie or I remain stock into it.





Are you using c_move to walk? Because c_moving into a physics object will not result in the physics object moving anymore than a physics object colliding into a c_moving entity will disturb it.

Oh, and take the ph_setgravity out of the action. This is what I was saying should not be in there.

Re: Problem with A 6 physics [Re: fastlane69] #141674
07/19/07 00:42
07/19/07 00:42
Joined: Oct 2005
Posts: 528
Italy
M
Mondivirtuali Offline OP
User
Mondivirtuali  Offline OP
User
M

Joined: Oct 2005
Posts: 528
Italy
Mmmmmm
I simply checked the polygon otpion on the object property box.

Code:
   
var earthgravity[3] = 0,0, -386;

action phys_obj
{


ph_setgravity(earthgravity);
phent_settype(my,PH_RIGID,ph_box);
phent_setmass(my,3,ph_box);
phent_setfriction(my,30);
phent_setelasticity(my,50,10);
phent_setdamping(my,20,20);
};
action phys_obj1
{


ph_setgravity(earthgravity);
phent_settype(my,PH_RIGID,ph_ball);
phent_setmass(my,3,ph_ball);
phent_setfriction(my,20);
phent_setelasticity(my,60,10);
phent_setdamping(my,20,20);


};
whats wrong about the set gravity?


And it worked (we are talking , this time, about the A7 Demo)
I set 2 actions: boxe and balls and put it a lot of boxes and balls and them worked! I can walk into them and things move!
Plus , I added an enemy also. I am planning to update my edition , after all.
Quote:

Are you using c_move to walk?



The p biped , I now using only the templates.

Last edited by Mondivirtuali; 07/19/07 00:45.
Re: Problem with A 6 physics [Re: Mondivirtuali] #141675
07/19/07 02:09
07/19/07 02:09
Joined: Mar 2003
Posts: 5,377
USofA
fastlane69 Offline
Senior Expert
fastlane69  Offline
Senior Expert

Joined: Mar 2003
Posts: 5,377
USofA
I have no idea why checking polygon box would "fix" anything but then again that is why I don't use A7 yet... too many uncertainties!


Quote:

whats wrong about the set gravity?




You are resetting the gravity with each new entity that starts their action. It's just pointless is all. Do one ph_setgravity at the start of the simulation and that's that... remember that gravity is universal and thus having them in the action WILL NOT assign an individual gravity to each object (if that was your intent).


Quote:

The p biped , I now using only the templates.




Remember that c_move and the PE don't play together. Thus if you run into a physics object with a c_move biped, the physics object will not react to the collision. And if a physics object bumps into a c_move object, the c_move object will likewise not react. In order to have them interact you'll have to go in and program the interaction through the event handler.

Re: Problem with A 6 physics [Re: fastlane69] #141676
07/19/07 13:40
07/19/07 13:40
Joined: Oct 2005
Posts: 528
Italy
M
Mondivirtuali Offline OP
User
Mondivirtuali  Offline OP
User
M

Joined: Oct 2005
Posts: 528
Italy
I simply checked in this way


and it works, at least I can run into the obs and they move.
One in A6 and many of them in the A7 (demo).

Re: Problem with A 6 physics [Re: Mondivirtuali] #141677
07/19/07 16:31
07/19/07 16:31
Joined: Mar 2003
Posts: 5,377
USofA
fastlane69 Offline
Senior Expert
fastlane69  Offline
Senior Expert

Joined: Mar 2003
Posts: 5,377
USofA
So you are c_moving into a physical object and that physical object responds?
Hmmmm... that is more unexpected than your solution to the problem!

Re: Problem with A 6 physics [Re: fastlane69] #141678
07/19/07 20:28
07/19/07 20:28
Joined: Oct 2005
Posts: 528
Italy
M
Mondivirtuali Offline OP
User
Mondivirtuali  Offline OP
User
M

Joined: Oct 2005
Posts: 528
Italy
I set as polygon every object and and an test model
the P. does work but, without the proper settings , the behavior of the obs. is really weird.
The opponent is ...well, less strong than me , he remain stucked but can still trohow away the boxes.
The final effect is not that good ; looks like the opponent does have an invisible force field around him.

watch video
http://www.youtube.com/watch?v=wdTx5Fe4B_c
I 'd like to shoot at the obs, too ; hope that some one will write a function for this, perhaps appling a force into the ob. in the direction of the shoot, like Doom 3.

Re: Problem with A 6 physics [Re: Mondivirtuali] #141679
07/20/07 12:52
07/20/07 12:52
Joined: May 2005
Posts: 15
D
danielo999 Offline
Newbie
danielo999  Offline
Newbie
D

Joined: May 2005
Posts: 15
Quote:

I set as polygon every object and and an test model
the P. does work but, without the proper settings , the behavior of the obs. is really weird.
The opponent is ...well, less strong than me , he remain stucked but can still trohow away the boxes.
The final effect is not that good ; looks like the opponent does have an invisible force field around him.

watch video
http://www.youtube.com/watch?v=wdTx5Fe4B_c
I 'd like to shoot at the obs, too ; hope that some one will write a function for this, perhaps appling a force into the ob. in the direction of the shoot, like Doom 3.




yeah i would need such a script too

Re: Problem with A 6 physics [Re: danielo999] #141680
07/20/07 16:04
07/20/07 16:04
Joined: Oct 2005
Posts: 528
Italy
M
Mondivirtuali Offline OP
User
Mondivirtuali  Offline OP
User
M

Joined: Oct 2005
Posts: 528
Italy
Update: the rocket launcher can make move the P objects!!!! The other weapons can not..the boxes and the balls react a little when I shoot them with a rocket laucher , I'd like to move them also with the other weapons and make them spread across the map, if I bombed them.
Perhaps with the proper settings..

Last edited by Mondivirtuali; 07/20/07 16:13.
Re: Problem with A 6 physics [Re: Mondivirtuali] #141681
07/20/07 20:26
07/20/07 20:26
Joined: Oct 2005
Posts: 528
Italy
M
Mondivirtuali Offline OP
User
Mondivirtuali  Offline OP
User
M

Joined: Oct 2005
Posts: 528
Italy
update
I wrote a mini function for ph_poly. The model howewer falls in the ground and sink ..the model is setted to polygon .
The rocket launcher may move the obs.
I'd like to move them also using the other weapons. I just have to discover as the whole thing works.

watch video
http://www.youtube.com/watch?v=JgDuGrE_Vzw

Re: Problem with A 6 physics [Re: Mondivirtuali] #141682
07/22/07 03:25
07/22/07 03:25
Joined: Mar 2006
Posts: 3,538
WA, Australia
J
JibbSmart Offline
Expert
JibbSmart  Offline
Expert
J

Joined: Mar 2006
Posts: 3,538
WA, Australia
u generally want to use convex polygonal hulls with PH_POLY. the way the physics engine works: objects intersect/touch each other and are pushed away so that they are only just touching, then whatever other forces are applied. the weird shape of the c_babe gives it trouble figuring out which way to move to fix the intersection.

the best way to solve this is to have an invisible model that represents that shape MOSTLY but keeping convex.

i suppose when you c_move into physics objects, the built in collision detection doesn't allow non-physics entities to hit physics entities (as the manual clearly points out), but then when the physics engine handles the physics-enabled entities it is moved to prevent the intersection. no forces are applied to it though.

the way it works: non-physics entities cannot hit physics entities, but physics entities can hit non-physics entities.

all your examples show:
Code:
};

at the end of your actions. the semi-colon afterwards is unnecessary, and i recommend you don't do it at all because if you ever move on to lite-C (most people will eventually, and it only takes about a day to work it out because it's basically the same) the compiler is more strict and will show up an error.

if you want a physics entity to react when being shot, you should enable events on the physics entities, and get them to apply a force to themselves when they "collide" with a bullet entity. if you do this, you should also get them to change a skill in the bullet/rocket entity to notify it that it has hit something and should destroy itself, because otherwise bullets and rockets will continue to travel through physics entities until they hit a wall or something.

this is still an ugly solution because the bullets move so fast, they often won't ever intersect a physics entity (that's why you only see slight movement). you should use c_trace instead with the bullets if you want to continue using physics entities.

hope this helps,

julz


Formerly known as JulzMighty.
I made KarBOOM!
Page 2 of 3 1 2 3

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