Gamestudio Links
Zorro Links
Newest Posts
Trading Journey
by M_D. 04/26/24 20:22
Help with plotting multiple ZigZag
by M_D. 04/26/24 20:03
Data from CSV not parsed correctly
by jcl. 04/26/24 11:18
M1 Oversampling
by jcl. 04/26/24 11:12
Why Zorro supports up to 72 cores?
by jcl. 04/26/24 11:09
Eigenwerbung
by jcl. 04/26/24 11:08
MT5 bridge not working on MT5 v. 5 build 4160
by EternallyCurious. 04/25/24 20:49
Zorro FIX plugin - Experimental
by flink. 04/21/24 07:12
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
4 registered members (M_D, AndrewAMD, Quad, Ayumi), 806 guests, and 5 spiders.
Key: Admin, Global Mod, Mod
Newest Members
wandaluciaia, Mega_Rod, EternallyCurious, howardR, 11honza11
19049 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Page 2 of 2 1 2
Re: 2.5D physics [Re: Helghast] #345465
10/26/10 16:06
10/26/10 16:06
Joined: Jul 2009
Posts: 1,198
Berlin, Germany
L
Liamissimo Offline
Serious User
Liamissimo  Offline
Serious User
L

Joined: Jul 2009
Posts: 1,198
Berlin, Germany
You do not have to enable it every frame with phent_enable, I posted my code, this works very fine for me. Or did you meant something else?


"Ich weiss nicht genau, was Sie vorhaben, aber Sie können keine Triggerzonen durch Ihr Level kullern lassen."
-JCL, 2011
Re: 2.5D physics [Re: Helghast] #345473
10/26/10 18:29
10/26/10 18:29
Joined: May 2009
Posts: 5,370
Caucasus
3run Offline OP
Senior Expert
3run  Offline OP
Senior Expert

Joined: May 2009
Posts: 5,370
Caucasus
TheLiam, "phent_addcentralforce" works only with physical object, that doesn't have gravity, or am I wrong?
I'm not gonna add any torque or force to my physical objects.
I just need them to do not move in Y coordinates, if they for example fall from hight place and rebound from the floor or other objects. Simulation needs to look completely as in a 2D game, but with 3D models.

Helghast, do you mean something like this:
///
while(1)
{
phent_enable(my,0);
my.y = 0;
phent_enable(my,1);
wait(1);
}
/////
If not, please, explain a bit more. Thank you all guys, for helping me out.


Looking for free stuff?? Take a look here: http://badcom.at.ua
Support me on: https://boosty.to/3rung
Re: 2.5D physics [Re: 3run] #345482
10/26/10 19:30
10/26/10 19:30
Joined: Sep 2003
Posts: 6,861
Kiel (Germany)
Superku Offline
Senior Expert
Superku  Offline
Senior Expert

Joined: Sep 2003
Posts: 6,861
Kiel (Germany)
(EDIT: for A7/ ODE: ) You can continuously add a force on its y-component to keep the entity on the x-z-plain, f.i. simply the negative y-distance.
Alternatively, create an invisible map entity with two walls on the left and right side of the x-axis and place it at your physic entity's position each frame (that's how I do it in my sidescroller).

Last edited by Superku; 10/26/10 19:59.

"Falls das Resultat nicht einfach nur dermassen gut aussieht, sollten Sie nochmal von vorn anfangen..." - Manual

Check out my new game: Pogostuck: Rage With Your Friends
Re: 2.5D physics [Re: 3run] #345483
10/26/10 19:31
10/26/10 19:31
Joined: Jul 2009
Posts: 1,198
Berlin, Germany
L
Liamissimo Offline
Serious User
Liamissimo  Offline
Serious User
L

Joined: Jul 2009
Posts: 1,198
Berlin, Germany
Man!

Yes, just try it like I wrote it. If you want to use vec_set then you have to phent_enable, but I can tell you it works with my way, really.

And no, addcentralforce works for everything, the manual just says that if there is no friction or gravtitation it will fly there constantly (?) which is logic because there is no friction or gravity wink


"Ich weiss nicht genau, was Sie vorhaben, aber Sie können keine Triggerzonen durch Ihr Level kullern lassen."
-JCL, 2011
Re: 2.5D physics [Re: Liamissimo] #345487
10/26/10 19:57
10/26/10 19:57
Joined: Jul 2007
Posts: 959
nl
F
flits Offline
User
flits  Offline
User
F

Joined: Jul 2007
Posts: 959
nl
oops srry didnt read the whole post

Last edited by flits; 10/26/10 20:38.

"empty"
Re: 2.5D physics [Re: flits] #345493
10/26/10 20:54
10/26/10 20:54
Joined: May 2009
Posts: 5,370
Caucasus
3run Offline OP
Senior Expert
3run  Offline OP
Senior Expert

Joined: May 2009
Posts: 5,370
Caucasus
TheLiam, thank you, I'll try.
Superku, please, explain a bit more about the alternative way, which you use in your project.


Looking for free stuff?? Take a look here: http://badcom.at.ua
Support me on: https://boosty.to/3rung
Re: 2.5D physics [Re: 3run] #345496
10/26/10 21:21
10/26/10 21:21
Joined: Sep 2003
Posts: 6,861
Kiel (Germany)
Superku Offline
Senior Expert
Superku  Offline
Senior Expert

Joined: Sep 2003
Posts: 6,861
Kiel (Germany)
The maximal size (any direction) of my player is ~90 quants.
I've created a map entity consisting of two walls (none or flat texture), some 100 quants in height and width, parallel to the x-axis (I use x/z-movement, too). The y-distance between both walls is 128 quants, so my 90 quants player can freely rotate within these limits.
When my player entity is stunned, I register it for the physics engine and vec_set(wall_map_entity.x,player.x) the position every frame. I only add torque around the y-axis and forces restricted to the x-/z-axis, so it does not look odd when (if ever) the player hits the invisible walls.


"Falls das Resultat nicht einfach nur dermassen gut aussieht, sollten Sie nochmal von vorn anfangen..." - Manual

Check out my new game: Pogostuck: Rage With Your Friends
Re: 2.5D physics [Re: Superku] #345516
10/27/10 08:40
10/27/10 08:40
Joined: May 2009
Posts: 5,370
Caucasus
3run Offline OP
Senior Expert
3run  Offline OP
Senior Expert

Joined: May 2009
Posts: 5,370
Caucasus
Looks easy and clear. Thank you, I'll give it a try laugh


Looking for free stuff?? Take a look here: http://badcom.at.ua
Support me on: https://boosty.to/3rung
Page 2 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