Gamestudio Links
Zorro Links
Newest Posts
Zorro FIX plugin - Experimental
by flink. 04/21/24 07:12
Data from CSV not parsed correctly
by EternallyCurious. 04/20/24 21:39
M1 Oversampling
by 11honza11. 04/20/24 20:57
Scripts not found
by juergen_wue. 04/20/24 18:51
zorro 64bit command line support
by 7th_zorro. 04/20/24 10:06
StartWeek not working as it should
by jcl. 04/20/24 08:38
folder management functions
by VoroneTZ. 04/17/24 06:52
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
1 registered members (AndrewAMD), 177 guests, and 2 spiders.
Key: Admin, Global Mod, Mod
Newest Members
EternallyCurious, howardR, 11honza11, ccorrea, sakolin
19047 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Page 1 of 3 1 2 3
Problem with A 6 physics #141663
07/17/07 15:39
07/17/07 15:39
Joined: Oct 2005
Posts: 528
Italy
M
Mondivirtuali Offline OP
User
Mondivirtuali  Offline OP
User
M

Joined: Oct 2005
Posts: 528
Italy
Q: What does "1 physics object" in A6 Commercial mean ?

A: You can have multiple objects with physcis, but only one can be active at any time. So you could have a door that uses physics, and a barrel that also uses them. When the player is close to the door, the door's physics are enabled. When the player is further away from the door, its physics are turned off. When the player gets close to the barrel, the barrel's physics are turned on and then when the player is out of sight, the physics are turned off.

now, I try to assign the same action to 2 objects, not close each other .
When I run the test map, I give this alert:

and then , the white ball does't move or reacts, while the orange one works and I can push it walking against.
the 2 balls are distant .

See the video
http://www.youtube.com/watch?v=PJuLZ1kVhrY
I wonder if there is need some code to deactivate or activate the P subsystem.
This is the code
Code:
  action phys_obj
{var earthgravity[3] = 0,0, -386;


ph_setgravity(earthgravity);
phent_settype(my,PH_RIGID,ph_sphere);
phent_setmass(my,1,ph_sphere);
phent_setfriction(my,30);
phent_setelasticity(my,50,10);
phent_setdamping(my,90,90);
};
}



Last edited by Mondivirtuali; 07/17/07 15:42.
Re: Problem with A 6 physics [Re: Mondivirtuali] #141664
07/17/07 16:05
07/17/07 16:05
Joined: Apr 2006
Posts: 1,551
Netherlands
D3D Offline
Serious User
D3D  Offline
Serious User

Joined: Apr 2006
Posts: 1,551
Netherlands
Maybe it need a trigger event. Did it worked when you applied it to only one object?


smile
Re: Problem with A 6 physics [Re: D3D] #141665
07/17/07 16:33
07/17/07 16:33
Joined: Oct 2005
Posts: 528
Italy
M
Mondivirtuali Offline OP
User
Mondivirtuali  Offline OP
User
M

Joined: Oct 2005
Posts: 528
Italy
Yes, the orange ball works ; any other objects do not.
I trought that the engine should switch around the P properties , automatically, based on the mere distance .

Another thing: the same code with the A7 demo don't works; I get no alert message but all the objects are inamovible.

Re: Problem with A 6 physics [Re: Mondivirtuali] #141666
07/18/07 16:12
07/18/07 16:12
Joined: Oct 2005
Posts: 528
Italy
M
Mondivirtuali Offline OP
User
Mondivirtuali  Offline OP
User
M

Joined: Oct 2005
Posts: 528
Italy
Please help..

Re: Problem with A 6 physics [Re: Mondivirtuali] #141667
07/18/07 18:58
07/18/07 18:58
Joined: Mar 2003
Posts: 5,377
USofA
fastlane69 Offline
Senior Expert
fastlane69  Offline
Senior Expert

Joined: Mar 2003
Posts: 5,377
USofA
The 1 entity restriction means that you can have only 1 object registered in the PE.

Hence when you assign that action to two objects, you register the first object created (and hence it works) but the second object isn't registered; hence when the 2nd objects actions run, it runs into those problems.

What you have to do is deactivate one object and activate another so that only 1 object is physical at a time. When an object is NOT registered, be careful not to run any PE commands (like set-type or phent_ commands).

The distance between the objects BTW is irrelevant. As far as the game enging is concerned, there are 2 objects trying to access PE commands and hence one has to fail.

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

Joined: Oct 2005
Posts: 528
Italy
How to deactivate the first entity? I should to create the P entity when I come closer.
I assigned one acton to this box, changing only the ph-boxCode:

action phys_obj
{var earthgravity[3] = 0,0, -386;


ph_setgravity(earthgravity);
phent_settype(my,PH_RIGID,ph_box);
phent_setmass(my,1,ph_box);
phent_setfriction(my,30);
phent_setelasticity(my,50,10);
phent_setdamping(my,90,90);
};
}


with one only entity
this time the box is passable and I stuck into it .




I still think that 3dgs need some templates for P only, some basic actions.
Is not easy as the other functions, needs a template .

Last edited by Mondivirtuali; 07/18/07 20:44.
Re: Problem with A 6 physics [Re: Mondivirtuali] #141669
07/18/07 20:47
07/18/07 20:47
Joined: Mar 2003
Posts: 5,377
USofA
fastlane69 Offline
Senior Expert
fastlane69  Offline
Senior Expert

Joined: Mar 2003
Posts: 5,377
USofA
I don't mean this to come off as insulting considering I have a PhD in Physics, but honestly using the PE is quite simple. Register the object, apply a force, watch it go!

The problem is that you are trying to workaround the 1 object commercial limitation; hence all of your problems have to do with the workaround and NOT the PE.

Conitec will not make a template to accomodate this workaround since a) it would defeat the purpose of the limit, b) they aren't working on A6 anymore, and c) unlimited physics is standard in all versions of A7 anyways!

So my advice to you is upgrade to A7 and use the PE without any work arounds. But if you stay with A6, not that un-registering an object is merely a null set_type call.

Re: Problem with A 6 physics [Re: fastlane69] #141670
07/18/07 21:07
07/18/07 21:07
Joined: Oct 2005
Posts: 528
Italy
M
Mondivirtuali Offline OP
User
Mondivirtuali  Offline OP
User
M

Joined: Oct 2005
Posts: 528
Italy
I tryed the same code on A7 (now the ph is the only purpose to me to upgrade) but it don't work. One or more objects does no matter; every objects is quite immobile or do not react when I come closer.

The damn orange ball in A6 was the only ph thing that I was able to get.

Last edited by Mondivirtuali; 07/18/07 21:09.
Re: Problem with A 6 physics [Re: Mondivirtuali] #141671
07/18/07 21:51
07/18/07 21:51
Joined: Mar 2003
Posts: 5,377
USofA
fastlane69 Offline
Senior Expert
fastlane69  Offline
Senior Expert

Joined: Mar 2003
Posts: 5,377
USofA
I can see a few things from your code:

1) Set gravity outside of action. It should be set once and not have to rely on entity creation (and it's action) to do it.

2) you have damping set at 90... this means your objects will be so damped, they won't move unless you apply a force EVERY frame. Drop that value a bit.

3) We have no idea how you apply the force. This is a big part of the problem and solution.

Don't know that the above will solve the problem, but it's all I can see that might be wrong from what you posted.

Re: Problem with A 6 physics [Re: fastlane69] #141672
07/18/07 22:46
07/18/07 22:46
Joined: Oct 2005
Posts: 528
Italy
M
Mondivirtuali Offline OP
User
Mondivirtuali  Offline OP
User
M

Joined: Oct 2005
Posts: 528
Italy
This is the new 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);
};


risult: the box don't movie or is passable, if I walk agaist him, it does not movie or I remain stock into it.
I need a template for some basic use of the P engine.

edit: with the polygon option checked the code (one box) does work

Last edited by Mondivirtuali; 07/18/07 23:02.
Page 1 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