Gamestudio Links
Zorro Links
Newest Posts
Trading Journey
by howardR. 04/24/24 20:04
M1 Oversampling
by Petra. 04/24/24 10:34
Zorro FIX plugin - Experimental
by flink. 04/21/24 07:12
Data from CSV not parsed correctly
by EternallyCurious. 04/20/24 21:39
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), 642 guests, and 3 spiders.
Key: Admin, Global Mod, Mod
Newest Members
Mega_Rod, EternallyCurious, howardR, 11honza11, ccorrea
19048 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Engine doubt #293024
10/08/09 17:58
10/08/09 17:58
Joined: Oct 2009
Posts: 20
V
vasco Offline OP
Newbie
vasco  Offline OP
Newbie
V

Joined: Oct 2009
Posts: 20
In a Game engine with Physics, I understand that collision detection and reaction are taken care by the engine itself. How can I activate it or in simple, how can i get the physics of Collision reaction between two balls in my game ?
Is there a script associated ( a wdl file) that I need to import ?
Also, how can I instantiate a model placed on the world via WED and not from code.

Re: Engine doubt [Re: vasco] #293027
10/08/09 18:01
10/08/09 18:01
Joined: Aug 2008
Posts: 2,838
take me down to the paradise c...
Cowabanga Offline
Expert
Cowabanga  Offline
Expert

Joined: Aug 2008
Posts: 2,838
take me down to the paradise c...
The collision is automatic. Except if you're using my.x += XX.

Re: Engine doubt [Re: Cowabanga] #293030
10/08/09 18:28
10/08/09 18:28
Joined: Oct 2009
Posts: 20
V
vasco Offline OP
Newbie
vasco  Offline OP
Newbie
V

Joined: Oct 2009
Posts: 20
Thats Awesome. I am beginning to like this !
So, are you saying that If I direct a player to move to a place with a mouse click on the destination and if there are any obstacles, collision detection and reaction are automatic ?

Re: Engine doubt [Re: vasco] #293031
10/08/09 18:31
10/08/09 18:31
Joined: May 2009
Posts: 1,816
at my pc (duh)
darkinferno Offline
Serious User
darkinferno  Offline
Serious User

Joined: May 2009
Posts: 1,816
at my pc (duh)
thats if you move your player using the physics engine and the objects in the way have physics enabled on them, if not, then the moving entity will just collide or slide along the obstacles

Re: Engine doubt [Re: darkinferno] #293034
10/08/09 19:08
10/08/09 19:08
Joined: Oct 2009
Posts: 20
V
vasco Offline OP
Newbie
vasco  Offline OP
Newbie
V

Joined: Oct 2009
Posts: 20
I cant understand the difference between moving with Physics enabled and not having it enabled; Can you give me some more insight or some Document to read on this.
As I said, when the user clicks on a position on a plane, then I want a ball to move to that point ( also take into consideration the balls in between the two points). A simple example can be that of a snooker table !
I would be glad to get some content related to this..

Re: Engine doubt [Re: vasco] #293692
10/13/09 08:43
10/13/09 08:43
Joined: Jul 2008
Posts: 553
Singapore
delinkx Offline
User
delinkx  Offline
User

Joined: Jul 2008
Posts: 553
Singapore
Well there are 2 ways to move your entity:

1. without physics.
2. with physics

for 1., u move the entity based on cordinates, distances, relative directions, etc., and the entities perform collision detections if u use c_move

but when u want to move an entity with physics, the its the force applied to it and the direction of the force that makes it move and the motion will be based on the physics parameters u set for that entity and also perform collisions in between the movement.

well, for snooker, the rule is not click a point and make ball move to that part. but instead u hit the cue ball with a force in a particular direction. so u need to apply a local force to the cue ball in a direction and the ball will move with all its physics parameters, taking care of the balls in between.

even if u want point and click, u need to calculate the direction from cue point to the clicked position. and apply the force on the ball in that direction.


A7 commercial Team / VC++ 2008 Pro
homepage | twitter | facebook
Re: Engine doubt [Re: delinkx] #295085
10/22/09 21:59
10/22/09 21:59
Joined: Oct 2003
Posts: 1,550
United Kingdom
indiGLOW Offline
Serious User
indiGLOW  Offline
Serious User

Joined: Oct 2003
Posts: 1,550
United Kingdom
With Physics:
Using physics, the objects will move and interact according to the settings you give them, the world they exist in, i.e. gravity,friction, mass amd so forth, only moving based on applying forces to them directly or indirectly, for example a ball rolling down a slope.

Without Physics:
Using move functions like c_move and c_rotate you can instruct an entity to move around the game world. Variables such as GLIDE or IGNORE_PASSABLE can change the way these entities interact with other objects.

In most cases you would probably not use Physics unless your game really requires it, such as a snooker or pool game. For example a while ago I created a roller ball style game that used invisible physics balls for each player, creating a more fluid and realistic form of movement, but this is something of an edge case.

If I was you I would take a look at the manual and some of the tutorials to get a good grip on movement in the engine.

Hope that helps grin


The Art of Conversation is dead : Discuss

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